error Inner matrix dimensions must agree?
Show older comments
Hi,
Can anyone tell me what's wrong with the code?
if true
k_1=0.423;
F=1.06;
gama=pi/F;
thetac=0:0.1:gama;
theta1=thetac;
theta0=0.4561;
l=0.21818;
j_L_theta1=(theta1*l)/2;
M=(k_1*(sin(theta0 - theta1)*sin(k_1*theta0)*sin(k_1*(gama - theta1)) - k_1*sin(k_1*(gama - theta1)) - sin(theta0 - theta1)*cos(k_1*theta0) + k_1*cos(theta0 - theta1)*sin(k_1*theta0) - sin(theta0 - theta1)*cos(k_1*theta0)*cos(k_1*(gama - theta1)) + k_1*cos(theta0 - theta1)*cos(k_1*theta0)*sin(k_1*(gama - theta1)) + k_1*cos(theta0 - theta1)*sin(k_1*theta0)*cos(k_1*(gama - theta1))))/(2*j_L_theta1*k_1 - k_1*sin(theta0 - theta1) - k_1^2*cos(k_1*theta0)*sin(k_1*(gama - theta1)) - k_1^2*sin(k_1*theta0)*cos(k_1*(gama - theta1)) - k_1*sin(theta0 - theta1)*cos(k_1*theta0)*cos(k_1*(gama - theta1)) + j_L_theta1*sin(theta0 - theta1)*cos(k_1*theta0)*sin(k_1*(gama - theta1)) + j_L_theta1*sin(theta0 - theta1)*sin(k_1*theta0)*cos(k_1*(gama - theta1)) + k_1*sin(theta0 - theta1)*sin(k_1*theta0)*sin(k_1*(gama - theta1)) + k_1^2*cos(theta0 - theta1)*cos(k_1*theta0)*sin(k_1*(gama - theta1)) + k_1^2*cos(theta0 - theta1)*sin(k_1*theta0)*cos(k_1*(gama - theta1)) + j_L_theta1*k_1^2*sin(theta0 - theta1)*cos(k_1*theta0)*sin(k_1*(gama - theta1)) + j_L_theta1*k_1^2*sin(theta0 - theta1)*sin(k_1*theta0)*cos(k_1*(gama - theta1)) + 2*j_L_theta1*k_1*cos(theta0 - theta1)*cos(k_1*theta0)*cos(k_1*(gama - theta1)) - 2*j_L_theta1*k_1*cos(theta0 - theta1)*sin(k_1*theta0)*sin(k_1*(gama - theta1)))
plot(thetac,M)
end
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!