# surface: rows (Z) must be the same as length (Y) and columns (Z) must be the same as length (X) in octave

I am having a dataset and trying to plot a 3-d plot between the independent and dependent variables.but, I am getting this error whenever I am trying to plot here is my code:

    temp1 = reshape(data(:,1),m,1);
temp2 = reshape(data(:,2),m,1);
temp3 = reshape(data(:,3),m,1);
mesh(temp1,temp2,temp3);
hold


thanks!

• Your question seems to be off-topic here. Also, it is not clear what you are trying to achieve. – nicoguaro Apr 21 '20 at 17:12

Double-check the documentation of mesh. temp3 must be a matrix of size length(temp1) x length(temp2), otherwise it won't work. That is literally what the error message is telling you. :)
What are you trying to plot exactly? Maybe you wanted to use plot3 instead?