Programming/Matlab
3D Surface 그래프
빠릿베짱이
2012. 11. 13. 18:38
반응형
predep = load('Pre_211_113.txt'); %dep = load('Cur_186_113.txt'); dep = load('segment.txt'); colormap('jet') colorbar z = meshgrid(1:320,1:240); [x y] = meshgrid(1:320,1:240); for(i=0:319) for(j=0:239) if(predep(j*320+i+1)) z(239-j+1,i+1) = -predep(j*320+i+1); else z(239-j+1,i+1) = -2000; end end end surface(x,y,z,'EdgeColor',[.9 .9 .9]); %mesh(x,y,z) hold on drawnow view(-20,70); shading interp grid on axis off %annotation1 = annotation('textarrow',[0.2196 0.4786],[0.5 0.7],'String',{'ggg'}); hold off예제 파일 :

매트랩 파일 :ThreedimPointGraph.m
결과
반응형