Question
I keep getting errors when I run the code below The ladder of a flre truck can be elevated % (increase of angle cp ),
I keep getting errors when I run the code below
The ladder of a flre truck can be elevated
% (increase of angle cp ), rotated
% about the z axis (increase of angle e),
% and extended (increase of r). Initially
% the ladder rests on the truck ( c1> = 0 ,
% e = 0, and r = 8 m). Then the ladder
% is moved to a new position by raising
% the ladder at a rate of 5 deg/s, rotating
% at a rate of 8 deg/s, and extending the ladder at a rate of 0.6 mls. Determine
% and plot the position of the tip of the ladder for 10 seconds.
Here is my code
r = 8:0.6:8+(0.6*10);
theta = 0:8:(8*10);
phi = 0:5:(5*10);
t = 0:1:10;
%%
% _Convert units_
%%
% *CALCULATIONS*
%
for i=1:11
x =r(:,i)*sind(theta(:,i))*cosd(phi(:,i));
y=r(:,i)*sind(theta(:,i))*sind(phi(:,i));
z = r(:,i)*cosd(theta(:,i));
table(i,1:3)=[x y z];
end
%%
%
%
% * *Analytical Solution*
%%
% *DISCUSSION and Presentation (Outputs)*
%
%
%
% *PROBLEM STATEMENT*
%
% The ladder of a flre truck can be elevated
% (increase of angle cp ), rotated
% about the z axis (increase of angle e),
% and extended (increase of r). Initially
% the ladder rests on the truck ( c1> = 0 ,
% e = 0, and r = 8 m). Then the ladder
% is moved to a new position by raising
% the ladder at a rate of 5 deg/s, rotating
% at a rate of 8 deg/s, and extending the ladder at a rate of 0.6 mls. Determine
% and plot the position of the tip of the ladder for 10 seconds.
imshow('HW_03_FIGURE_6.png')
%%
disp('The position of the ladder tip after 10 seconds.')
disp('x y z')
disp(table)
plot(table(:,1),table(:,2), table(:,3),'r.')
This is the error that I keep getting
Error using plot Data must be a single matrix Y or a list of pairs X,Y. Error in HW_03_PROBLEM_6 (line 88) plot(table(:,1),table(:,2), table(:,3),'r.')
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started