I have tried another one. Again I 'm getting the notification that, 'Not enough input arguments'. Can you help me to solve.
4 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 31 May 2021
Edited: Walter Roberson
on 31 May 2021
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 Comments
Walter Roberson
on 31 May 2021
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.)
See Also
Categories
Find more on Equation Solving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!