Problem with 3D plotting
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi!
Lets say I have these matrices: B=1x3 C=1x3 D=3x3 I want to have a 3D plot of D vs B-C plane. How can I do this? I read the help for the surface command but seems like I cant use it like this.
댓글 수: 0
채택된 답변
Youssef Khmou
2013년 2월 24일
편집: Youssef Khmou
2013년 2월 24일
hi, 1. You can use plot3 :
>>B=rand(3,1);
>>C=rand(3,1);
>>D=rand(3,3);
>>plot3(B,C,D)
As size(D)=[3 3] then it is like you do
>>figure, plot3(B,C,D(:,1))
>>hold on, plot3(B,C,D(:,2))
>>plot3(B,C,D(:,3))
>>hold off
2.Or simply surf/mesh if D=F(B,C) :
>>mesh(D)
>>surf(D)
3.try other features :
doc surfl
doc contour
댓글 수: 2
Youssef Khmou
2013년 2월 24일
편집: Youssef Khmou
2013년 2월 24일
Its fine, try directly
>>surf(D), shading interp
>>mesh(D)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!