Error using mtimes
이전 댓글 표시
This is the script I am currently processing through MATLAB however it keeps returning me an error that says : ??? Error using ==> mtimes Inner matrix dimensions must agree.
Error in ==> Complexmodel at 12 T1=((elevator_mass+load_mass1)*g+X)*a;
My script:
g=9.81;
elevator_mass=1000;
load_mass1=1500;
load_mass2=2000;
load_mass3=2500;
safe_load=4500;
u=0.6:1:1.6;
a=0:1:10;
safty(1:11)=safe_load;
X=3.*u.^2;
xlabel_information='Elevator acceleration';
T1=((elevator_mass+load_mass1)*g+X)*a;
T2=((elevator_mass+load_mass2)*g+X)*a;
T3=((elevator_mass+load_mass3)*g+X)*a;
plot(a,T1,'b-o',a,T2,'g-o',a,T3,'k-o',a,safty,'.');
xlabel(xlabel_information)
ylabel('Cable Tension')
title('Tension vs Acceleration');
legend('load mass 1','load mass 2','load mass 3','Safe load');
[EDITED, JSimon, 09-Oct-2011 16:19 UTC] Code formatted - please do this by your own, see Markup help
채택된 답변
추가 답변 (1개)
Andrei Bobrov
2011년 10월 9일
u=0.6:.1:1.6
카테고리
도움말 센터 및 File Exchange에서 Aerospace Blockset에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!