MATLAB: Error using / Matrix dimensions must agree…

Parallel Computing Toolboxparfor

Hi,
The content of my script is the flowing
parfor i = 1:26
run('..\extract'+i+'.m')
end
the error is Error using ==> plus Matrix dimensions must agree
Error in ==> parallel_function at 473 F(base, limit);
Thanks.

Best Answer

Hi,
MATLAB is not Java ;-).
Concatenating strings uses [] in MATLAB:
run(['..\extract' num2str(i) '.m'])
Titus