当前位置:编程学习 > Matlab >>

Matlab 求高人解答

clear, format compact, close all, clc disp(['IMU/Buch 2010 Verasuchs-Gerüst, symb', date]) disp('teilsystem 3: Traverse') %---------------------------------symbolisch %Schnittgroesen-Verlaeufe syms z a b % Koordinate, Geometrie syms Ft Fz % Kraefte disp('---Gleichgewichtsbedingungen') ggb = 2*Ft - 5*Fz Ft = solve(ggb, Ft) disp('----Schnittgroessen-Verlaeufe (bereichsweise)') disp('*** 0<z<b') M1 = -Ft*z, Q1 = diff(M1,z) disp('*** b<z<a+b') M2 = simple(M1 + Fz*(z-b)), Q2 = diff(M2, z) disp('*** a+b<z<2a+b') M3 = simple(M2 + Fz*(z-a-b)), Q3 = diff(M3, z); disp('*** 2a+b<z<3a+b') M4 = simple(M3 + Fz*(z-2*a-b)), Q4 = diff(M4, z); disp('*** 3a+b<z<4a+b') M5 = simple(M4 + Fz*(z-3*a-b)), Q5 = diff(M5, z) disp('*** 4a+b<z<4a+2b') M6 = simple(M5 + Fz*(z-4*a-b)), Q6 = diff(M6, z) %-----------------------numerisch Fz=8e+6 %Parameterberechnung lt,b S = 400; % [mm] Dicke Rahmen Lt = 3500; % [mm] Laenge Traverse a = 500; % [mm] Zylinder-Abstand H_o = 650; % [mm] Hoehe oberes Fenster Rt = 1000; % [mm] Radius b = (Lt - 4*a - S)/2 lt = Lt/2 - sqrt(Rt^2 - H_o^2) disp('*** b, Lt [m]') disp([b, lt]*10^(-3)) %Schnittgroessen-Verlaeufe 1 z1 = linspace(0,subs(b),10); M1 = subs(M1); Q1 = subs(Q1); if length(Q1)==1, Q1=Q1*ones(length(z),1); end %Visualisierung figure(1), nor = 1e+3; % subplot(211),plot(z,M1),grid, hold on % subplot(212),plot(z,Q1),grid, hold on %Schnittgroessen-Verlaeufe 2 z2 = linspace(b,a + b,10); M2 = subs(M2); Q2 = subs(Q2); if length(Q2)==1, Q2=Q2*ones(length(z),1); end %Visualisierung % figure(2) % subplot(211),plot(z,M2),grid, hold on % subplot(212),plot(z,Q2),grid, hold on %Schnittgroessen-Verlaeufe 3 z3 = linspace(a + b,2*a + b,1); M3 = subs(M3); Q3 = subs(Q3); if length(Q3)==1, Q3=Q3*ones(length(z),1); end %Visualisierung % figure(3) % subplot(211),plot(z,M3),grid, hold on % subplot(212),plot(z,Q3),grid, hold on %Schnittgroessen-Verlaeufe 4 z4 = linspace(2*a + b,3*a + b,10); M4 = subs(M4); Q4 = subs(Q4); if length(Q4)==1, Q4=Q4*ones(length(z),1); end %Visualisierung % figure(4) % subplot(211),plot(z,M4),grid, hold on % subplot(212),plot(z,Q4),grid, hold on %Schnittgroessen-Verlaeufe 5 z5 = linspace(3*a + b,4*a + b,10); M5 = subs(M5); Q5 = subs(Q5); if length(Q5)==1, Q5=Q5*ones(length(z),1); end %Visualisierung % figure(5) % subplot(211),plot(z,M5),grid, hold on % subplot(212),plot(z,Q5),grid, hold on %Schnittgroessen-Verlaeufe 6 z6 = linspace(4*a + b,4*a + 2*b,10); M6 = subs(M6); Q6 = subs(Q6); if length(Q6)==1, Q6=Q6*ones(length(z),1); end %Visualisierung % figure(6) z =[z1, z2, z3, z4, z5, z6]; M =[M1, M2, M3, M4, M5, M6]; Q =[Q1, Q2, Q3, Q4, Q5, Q6]; %subplot(211), plot(M/nor^3,double(z)),grid, hold on % subplot(212),plot(z,Q/nor^3),grid, hold off 以下是运行错误 ??? Error using ==> plot Conversion to double from sym is not possible. Error in ==> Traverse_Zhang at 97 subplot(211),plot(z,M/nor^3),grid, hold on
答案:>> M
M =
[            -20000000*z, -12000000*z-4400000000, -4000000*z-12800000000,  4000000*z-25200000000, 12000000*z-41600000000, 20000000*z-62000000000]

z 还是符号呢,怎么能plot?
其他:。。。+_+! 

上一个:matlab 里的 ’* 是做什么的?
下一个:matlab 求 d^3*(x*e^x)/d*x^3 代码!!

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,