MATLAB Answers

Plotting a line moving down straight vertically. Both the lines are not rotating in symmetry.

1 view (last 30 days)
Neelesh Sharma
Neelesh Sharma on 7 Mar 2021
Commented: Neelesh Sharma on 7 Mar 2021
L1=60;
L2=15;
t=60;
for t1=t:-1:0
plot([-L1*cosd(t),0],[L1*sind(t1),0]);
hold on
grid on
plot([0,L2*cosd(t1)],[0,-L2*sind(t1)]);
axis([-70 70 -70 70]);
hold off
pause(0.1);
end

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 7 Mar 2021
Edited: KALYAN ACHARJYA on 7 Mar 2021
"Both the lines are not rotating in symmetry."
plot([-L1*cosd(t1),0],[L1*sind(t1),0]); % First Line
%..............^changed here
Now both lines are rotating in equal manner, are you looking for this one?
  9 Comments
Neelesh Sharma
Neelesh Sharma on 7 Mar 2021
The lines L1 and L2 will be straight in the first line and last line but not in between as shown in fig attached. They should be in straight line always.

Sign in to comment.

Tags

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by