フィルターのクリア

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 件のコメント
Torsten
Torsten 2021 年 5 月 31 日
If you want a numerical answer, use
S = double(solve(CC==0,var))
shunmugam hemalatha
shunmugam hemalatha 2021 年 5 月 31 日
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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by