3d plot with x value being constant

2 Ansichten (letzte 30 Tage)
Darren Marcelino
Darren Marcelino am 13 Dez. 2022
Kommentiert: Darren Marcelino am 20 Jan. 2023
im trying to plot a point on a 3d plot but i keep coming up with the error
Error using plot3
Vectors must be the same length.
Error in threed_suspension (line 50)
I dont know how to keep p5x constant while p5y and p5z a changing variable.
p5y(i)= RL*cosd(LowerTheta(i));
p5z(i)=RL*sind(LowerTheta(i)); %parallel
p5x= p1x*z;

Akzeptierte Antwort

Askic V
Askic V am 13 Dez. 2022
p5x= p1x*ones(z);
  4 Kommentare
Darren Marcelino
Darren Marcelino am 20 Jan. 2023
I ended up figuring that spherical coordinates are easier to manipulate and keep stuff constant. i rewrote my code using spherical coordinates. i found it easier. i had to do extra trig to figure out angles but i found that if you are trying to keep a length constant, one end of it is pinned. (360 freedom of movement) , and the other end is moving in the 3d space, spehrical coordinates are best to use.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)


Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by