surf(x,y,z) produces a striat line
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to plot a 3d image I use the following: vertex is a 3*428 array
sze=size(vertex(2)); x=vertex(1:1,:); y=vertex(2:2,:)'; z=vertex(3:3,:); s=ones(sze,sze); t=ones(sze,sze); h=ones(sze,sze); for j=1:8 for i =1:sze s=vertcat(x,x); x=s; end end for j=1:8 for i =1:sze t=vertcat(x,x); y=t; end end for j=1:8 for i =1:sze h=vertcat(x,x); z=h; end end
x=vertcat(x,x); x=x(1:428, 1:end); y=y(1:428, 1:end); z=z(1:428, 1:end); surf(x,y,z); [m,n]=size(z); C = (z(1:(m-1),1:(n-1))+z(2:m,1:(n-1))+ ... z(1:(m-1),2:n)+z(2:m,2:n))/4; surf(x,y,z,C);
It produces a strait line, and not the model I want
can you please help
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!