Hello,
So I am trying to create a plot of a triabgle from three matrices a = [5; 8; 13]; b = [-5; 7; 21]; c = [12; -32; 0]; . I have used plot3 for every possible combination of vectors a, b, and c and well as every possible combination of their transposes and only seem to get two lines. Are there any other plotting methods I should try?
Thank you

3 Kommentare

Matt J
Matt J am 19 Sep. 2022
Are a,b, and c the vertices of the triangle?
alex morris
alex morris am 19 Sep. 2022
yes they are the vertices
Matt J
Matt J am 19 Sep. 2022
Bearbeitet: Matt J am 19 Sep. 2022
Then see my answer below, and tell us if it works.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Matt J
Matt J am 19 Sep. 2022
Bearbeitet: Matt J am 19 Sep. 2022
a = [5; 8; 13]; b = [-5; 7; 21]; c = [12; -32; 0];
V=num2cell([a,b,c,a],2);
plot3(V{:},'-o', MarkerFace='r');
xlabel x; ylabel y; zlabel z; grid on

Weitere Antworten (0)

Produkte

Version

R2020a

Gefragt:

am 19 Sep. 2022

Bearbeitet:

am 19 Sep. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by