I have tried another one. Again I 'm getting the notification that, 'Not enough input arguments'. Can you help me to solve.

1 次查看(过去 30 天)
clc
clear all
a=120;
b=100;
k1=4;
k2=80;
h=0.33;
theta=0.07;
delta=0.5;
c2=2.5;
c3=10;
c4=5;
syms T t
C = (1/T)*(((t^3)*(((a*h)/(6*theta))+((c2*a*theta)/2)))+((b/2)*(c3+(delta*c4))*((T-t)^2))+(k1*t)+k2);
%[T,t]=solve(C)
Vars = [T, t];
[C]= solve(var)
%S= solve (C, T, t)
To get the answer t= 15228, T = 1.5871 and C =80.2626.
  5 个评论
shunmugam hemalatha
I'm very sorry to answer . Still, I'm getting
S =
-8.4285 + 0.0000i
1.2320 - 0.5961i
1.2320 + 0.5961i
Actually, I need the procedure to calculate the two variables in one equation. Will you please to get the answer as
t= 15228, T = 1.5871 and C =80.2626.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2021-5-31
编辑:Walter Roberson 2021-5-31
Vars = [T, t];
[C]= solve(var)
You ask to solve(var) but var is not defined by your code, so var is being taken as a reference to the variance function var()
  3 个评论
Walter Roberson
Walter Roberson 2021-5-31
If you define
syms T t C
eqn = C == (1/T)*(((t^3)*(((a*h)/(6*theta))+((c2*a*theta)/2)))+((b/2)*(c3+(delta*c4))*((T-t)^2))+(k1*t)+k2)
then you would have a single equation in three variables. You would be unlikely to find a single solution -- any change in T or t would result in a different right hand side, and you could call C whatever the new result was, since C does not appear on the right hand side.
If you want to solve for T t C then you need three simultaneous equations, except cases where you can prove that the equations have no solutions except at some special points (for example, if there were a contradiction that only vanished if T were infinity so that 1/T was 0 causing the rest of the expression to vanish.)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by