필터 지우기
필터 지우기

Plotting 3D graph with 3 different set of coordinates

조회 수: 2 (최근 30일)
Mark Loui
Mark Loui 2021년 7월 29일
댓글: Mark Loui 2021년 7월 29일
HI there I need some help please,
%Node 1
x1=-419;y1=-341;z1=30;
z2=15; z3=0;
hold on
plot(x1,y1,z1)
hold on
plot(x1,y1,z2)
hold on
plot(x1,y1,z3)
hold off
There is a problem with the plotting it says in the matlab file, i also like to ask if i have another set of coordinates that wants to be plotted into the same graph can it be done, meaning this 3D Graph has 6 different coordinates but the only difference is the z direction.

채택된 답변

KSSV
KSSV 2021년 7월 29일
편집: KSSV 2021년 7월 29일
When you are plotting single point, you need to use marker.
%Node 1
x1=-419;y1=-341;z1=30;
z2=15; z3=0;
hold on
plot3(x1,y1,z1,'s')
hold on
plot3(x1,y1,z2,'s')
hold on
plot3(x1,y1,z3,'s')
hold off
You can plot whay you want using scatter3. Read about it.
%Node 1
x1=-419;y1=-341;z1=30;
z2=15; z3=0;
x = repelem(x1,3,1) ;
y = repelem(y1,3,1) ;
z = [z1;z1;z3] ;
scatter3(z,y,z,1000,z,'.');
  댓글 수: 2
Mark Loui
Mark Loui 2021년 7월 29일
Thanks but I got the idea from another source already I use the plot3 method with hold on and off method, thanks anyway
Mark Loui
Mark Loui 2021년 7월 29일
Oh wait is the same method haha sorry thanks for the idea too

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by