Why am I only receiving one value for theta3 and alpha3, do I need to use a "for" loop instead?

1 view (last 30 days)
theta2=linspace(0,360);
force=zeros(size(theta2));
force (theta2>=0 & theta2<180)=100;
force(theta2>=180 & theta2<=360)=-2000;
theta3=-asind((a*sind(theta2)/b))+180;
omega3=(a*cosd(theta2)*omega2)/(b*cosd(theta3));
alpha3=(a*alpha2*cosd(theta2)-a*omega2^2*sind(theta2)+b*omega3^2*sind(theta3))/(b*cosd(theta3));

Answers (1)

Walter Roberson
Walter Roberson on 2 Dec 2022
/ is not the division operator in MATLAB. A/B is like inner product of A and the pseudoinverse of B. It is for solving systems of linear equations of the form A = x*B
The division operator is ./

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!