필터 지우기
필터 지우기

surf(x,y,z) produces a striat line

조회 수: 5 (최근 30일)
Mohamed Elkomy
Mohamed Elkomy 2014년 3월 4일
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개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by