clear;clc;Ro=1; G=981; A1=100; A2=150; A3=125;% *********************Hallando Desplazamiento**************************
CC = input ('Ingrese la COMPLIANCIA (cm3/cmH2O)DEL PULMON C = ')subplot (2,2,1);syms t ;t=0:0.1:3; Q =(t+0.1*sin(8*t)); % stairs(t,Q); hold on % hold off
plot(t,Q)legend('t+0.1*sin(8t)')title ("FLUJO/CAUDAL Q, VARIANTE RESPECTO AL TIEMPO")xlabel("Tiempo (seg)")ylabel("Flujo ó Caudal en LPM")% ***********************Hallando Aceleración***************************
C= CC/981;syms TQ = (T+0.1*sin(8*T));X=((C*Ro*G*Q*T*(A1+A2-A3)/C*Ro*G*A1*A3)-Q*T*A1*(A2-A3)/(C*Ro*G*A1*A3)); subplot(2,2,2);T=0:0.01:3; Acel= diff (X,2); % Derivada de segundo orden
Acel=double(subs(Acel)); % stairs(T,Acel);% hold off
hold on plot(T,Acel)title ("ACELERACIÓN RESPECTO AL TIEMPO ")xlabel("Tiempo (seg)")ylabel("Aceleracion en cm/seg2")%*******************Hallando VOLUMEN****************************
C= CC/981; syms TQ = (T+0.1*sin(8*T)); T=0:0.01:3;q=double (subs(Q));q1=diff(Q)ql=double(subs(Q));q2=diff (Q,2)q2=double(subs(Q));subplot (2,2,3)% Volum = Acel*(T.^2/2)*((A1*A3)/(A1+A2-A3)); pretty (Volum);
Volum= (2*T.^2*q1+q2*T.^3*((1/2-(A1*(A2-A3))/2*C*Ro*G(A1+A2-A3))))% Volum= T.^2+ T.^2*cos(T) - 0.5*sin(T.^4)
hold ongrid onvol= eval (Volum)plot(T,Vol)%**************Hallando PRESIÓN******************
syms TQ = (T+0.1*sin(8*T)); T=0:0.1:3; Pres=(Volum*((A1+A2-A3)/A1- C*Ro*G(A1+A2-A3)-A1(A2-A3)/C*Ro*G*A1))/ A2-A3; plot(t,Pres)title ("PRESION CON RESPECTO AL TIEMPO ")xlabel("Tiempo (seg)")ylabel("Presión en cm-H2O")
MATLAB: Please help me !!! Error using * Inner matrix dimensions must agree. Error in GRAFICA_TOTAL_2 (line 40) Volum= (2*T.^2*q1+q2*T.^3*((1/2-(A1*(A2-A3))/2*C*Ro*G(A1+A2-A3))))
inner matrix
Related Question
- Plot of a function
- Integrals involving symbolic probability distributions
- ERROR: “Undefined function or method for double type” + “feval error” – Strange case/no plots
- How to symsum to type follow eqution
- Hi everyone, when I run this code, command window shows me an error that says “Error using principal>odefun (line 41) Not enough input arguments. Error in principal (line 13) [tspan,Y]=ode45(odefun, tspan, y0)”; I’m relatively new to matlab. HELP!
Best Answer