필터 지우기
필터 지우기

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 CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by