Matlab has a nice feature that lets you chain commands by treating functions as variables. This means that you can write: a …
Month: December 2013
Saving from inside a parfor loop in Matlab
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 …
Making function returns in Matlab compact
I used to write this in Matlab: foo1 = zeros(1,100); foo2 = cell(1,100); for i = 1:100 [tmpFoo1, tmpFoo2] = foo ( …