I am not well verse in Matlab, and tried to run the code below. However, I keep getting an error stating "Not enough input arguments." I'm not sure what does this means.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
shunmugam hemalatha
el 31 de Mayo de 2021
Respondida: shunmugam hemalatha
el 2 de Jun. de 2021
clear all
c0 =40;
cd = 50;
y0 = 0.09;
h = 0.7;
tow = 5;
u = 0.05;
a = 260;
b = 0.1;
syms T tow
%x = '((a*h)/2)+((a*tow*T)/3)+((a*h*T*((exp^(-u*tow))+b))/3)+((a*tow*(T^2)*((exp^(-u*tow))+b))/8)-(c0/(T^2))+(cd*((3*a*y0*(exp^(-u*tow)))-(2*T*a*b*y0*(exp^(-u*tow)))-(2*T*a*(b^2)))/6)';
%y ='1-((u*a*h*(T^2)*y0*(exp^(-u*tow)))/6)-((u*a*tow*(T^3)*y0*(exp^(-u*tow)))/24)-(cd*u*T*y0*(exp^(-u*tow))*((3*a-a*b*T)/6))';
%[T, tow]= solve ([x, y])
[solT,soltow] = solve ([((a*h)/2)+((a*tow*T)/3)+((a*h*T*((exp^(-u*tow))+b))/3)+((a*tow*(T^2)*((exp^(-u*tow))+b))/8)-(c0/(T^2))+(cd*((3*a*y0*(exp^(-u*tow)))-(2*T*a*b*y0*(exp^(-u*tow)))-(2*T*a*(b^2)))/6)==0, 1-((u*a*h*(T^2)*y0*(exp^(-u*tow)))/6)-((u*a*tow*(T^3)*y0*(exp^(-u*tow)))/24)-(cd*u*T*y0*(exp^(-u*tow))*((3*a-a*b*T)/6))==0], [T, tow])
TC = (c0/T)+(1/T)*(((a*h*(T^2))/2)+((a*tow*(T^3))/6)+((((a*y0*(exp^(-u*tow))+b)/2)*((h*(T^3)/3)+((tow*(T^4)/12))))))+(cd/T)*((((T^2)*y0*(exp^(-u*tow)))*(3*a-a*b*T))/6)+((tow*T)/T)
I need the answer: TC =230.390, T = 0.388 and tow = 48.420. Help me to find the answer.
0 comentarios
Respuesta aceptada
Walter Roberson
el 31 de Mayo de 2021
In order to use
exp^(-u*tow)
You would need to have defined exp as a square array (including a scalar), or you would have had to have defined exp as a function that accepted no arguments.
If you were expecting exp to be the exponential, then do not use ^ : use
exp(-u*tow)
You could instead use
exp = exp(1);
and continue to use exp^ ... but that is not recommended, and would be less accurate than using exp() without the ^
2 comentarios
Walter Roberson
el 31 de Mayo de 2021
c0 =40;
cd = 50;
y0 = 0.09;
h = 0.7;
tow = 5;
u = 0.05;
a = 260;
b = 0.1;
syms T tow
[solT,soltow] = solve ([((a*h)/2)+((a*tow*T)/3)+((a*h*T*((exp(-u*tow))+b))/3)+((a*tow*(T^2)*((exp(-u*tow))+b))/8)-(c0/(T^2))+(cd*((3*a*y0*(exp(-u*tow)))-(2*T*a*b*y0*(exp(-u*tow)))-(2*T*a*(b^2)))/6)==0, 1-((u*a*h*(T^2)*y0*(exp(-u*tow)))/6)-((u*a*tow*(T^3)*y0*(exp(-u*tow)))/24)-(cd*u*T*y0*(exp(-u*tow))*((3*a-a*b*T)/6))==0], [T, tow])
TC = (c0/T)+(1/T)*(((a*h*(T^2))/2)+((a*tow*(T^3))/6)+((((a*y0*(exp(-u*tow))+b)/2)*((h*(T^3)/3)+((tow*(T^4)/12))))))+(cd/T)*((((T^2)*y0*(exp(-u*tow)))*(3*a-a*b*T))/6)+((tow*T)/T)
subs(TC, [T, tow], [solT, soltow])
Más respuestas (1)
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!