surf(x,y,z) produces a striat line
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!