i'm trying to run insertion sort as a parallel programming using parfor, but it gives me some kind of error which I cant fix, here is the code:-
clear At=cputime;x = 1 : 100;n = length(x);parfor j = 2:n pivot = x(j); i = j; while ((i > 1) && (x(i - 1) > pivot)) x(i) = x(i - 1); i = i - 1; end x(i) = pivot; end cputime-tError: The variable x in a parfor cannot be classified.See Parallel for Loops in MATLAB, "Overview".
Best Answer