Matlab Note to Self Programming Uncategorized

Saving from inside a parfor loop in Matlab


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /data/1/b/1b32a628-bdcf-4151-86ff-5d5550106b39/nonconditional.com/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /data/1/b/1b32a628-bdcf-4151-86ff-5d5550106b39/nonconditional.com/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

If you call save from a parfor loop in Matlab, like this for example: parfor k=1:100 foo = exp(-k); save([’myfile’,num2str(k),’.mat’],’foo’); endparfor k=1:100 …

Math Matlab

Calculating the indices for n choose k


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /data/1/b/1b32a628-bdcf-4151-86ff-5d5550106b39/nonconditional.com/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /data/1/b/1b32a628-bdcf-4151-86ff-5d5550106b39/nonconditional.com/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /data/1/b/1b32a628-bdcf-4151-86ff-5d5550106b39/nonconditional.com/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /data/1/b/1b32a628-bdcf-4151-86ff-5d5550106b39/nonconditional.com/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

So if you want to calculate n choose k, or n over k or all k different combinations of n unique items …