반응형
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
예제 파일 :
Pre_211_113.txt
매트랩 파일 :
ThreedimPointGraph.m
결과
반응형
'Programming > Matlab' 카테고리의 다른 글
| 옥타브(Octave) 명령어 모음 (1) | 2015.06.12 |
|---|---|
| 무료 온라인 매트랩 ( Free Online Matlab ) (0) | 2015.05.14 |
| 옥타브(octave) 설치 후 실행 오류, VirtualAlloc pointer is null, Win32 error 487 (2) | 2015.05.12 |
| RANSAC을 이용한 3차원 데이터 Line fit 예제 (0) | 2013.06.12 |