Too many output arguments.
古いコメントを表示
I've found this code that may help me a lot.
I cannot run, it keeps saying:
Error using type
Too many output arguments.
my version is 2014b
the code is
function [t,y]=valori(type)
a=340;
S=0.25;
x10=0.85;
U=144;
if (type == 1)
Ac=0.0034;
Vp=0.32;
Lc=0.3;
H=3.2613e4;
W=0.3689;
else
if (type == 2)
Ac=0.0033;
Vp=0.025;
Lc=1.22;
H=0.09e5;
W=0.1;
else
Ac=0.0090;
Vp=0.001;
Lc=2.8;
H=1.55e4;
W=0.1587;
end
end
[t,y]=greitzer2(a,Ac,Vp,Lc,U,H,W,x10,S);
end
function [t,y]=greitzer2(a,Ac,Vp,Lc,U,H,W,x10,S)
wh=a*sqrt(Ac/(Vp*Lc));
B=U/(2*wh*Lc);
k=x10-S*(x10-(1/3)*(x10.^3));
[t,y]=ode45(@(t,y)greitzer10(H,W,B,U,Ac,y,S,k),[0 100],[0,0]);
subplot(2,2,1)
plot(t,y(:,1))
xlabel('t')
ylabel('\phi_c')
subplot(2,2,2)
plot(y(:,1),y(:,2))
xlabel('\phi_c')
ylabel('\psi')
subplot(2,2,3)
plot(t,y(:,2))
xlabel('t')
ylabel('\psi')
end
function dydt = greitzer10(H,W,B,U,Ac,y,S,k)
dydt = [ ((3*H*Ac*B)/(W*U))*((y(1)-(1/3)*((y(1).^3)))-y(2)); ((W*U)/(3*H*Ac*B))*(y(1)-(S*y(2)+k)) ];
end
this might be a missing part:
function y=carcomp(C0,H,x,W)
y=C0+H*(1+(3/2)*((x/W)-1)-(1/2)*(((x/W)-1).^3));
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Axes Appearance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
