Hello i hope im not missing something obvious by putting this here but ive been stuck for hours. I am trying to solve this problem, basically i need to fill a zero matrix with different values for von mises stress and then plot it using a contour plot. I continue to encounter the error in the title, i am also not sure if maybe the problem is in my loop rather than Z.
function Hertz2DContour (P,R,ECM,nu,mu,N)
a = ((4*P*R)/(pi*ECM))^0.5
p0 = (2*P/pi*a)
X = linspace (-1.5*a,1.5*a,N);
Z = ([1:N] - 0.5) * 3 * a / N;
sv = zeros (N,N);
Any help would be greatly appricated, thank you.