Dear All,
I tried to use parfor to run my code which is given as follows:
function [A,B] = temp_test(x)a = [1:2*x]; b = [1:x];A = zeros(1,x); B = zeros(x,1);parfor i = 1 : x j = x + 1; c = func1(a(j),b(i)); A(i) = c; B(i) = a(j) + b(i);endfunction [d] = func1(e,f) d = e*f;endend
But I was told I can not call func1 like this because it is a nested function. Would anybody tell me how I can fix this problem but I still want to keep the func1 as it is?
Thanks a lot.
Benson
Best Answer