how to find the two unknowns from the nonlinear equation
25 views (last 30 days)
Show older comments
clc
clear all
format compact
syms k lambda c T b t0 theta h
lambda=600; b=3;
theta=0;
c=5;
k=250;
h=1.75;
TC=(k/T)+c*lambda+(lambda*(c*theta+h)*(exp(theta*t0)-theta*t0-1))/(T*(theta)^2)+(lambda*b*(T-t0)^2)/(2*T);
dTCdt0=diff(TC,t0);
dTCdT=diff(TC,T);
[T,t0]=solve(dTCdt0,dTCdT)
t0=subs(t0);
digits(3)
t0=vpa(t0)
T=subs(T);
T=vpa(T)
p=theta*t0;
TC=subs(TC);
digits(3)
TC=vpa(TC);
TC=round(TC)
z=sqrt((2*k*(h+c*theta)*b)/(b+h+(c*theta)))*(sqrt(3800)-137.816)
This is my code. I am unable to get the answer for the above. I got the error while I was running the code.
Error using sym/solve (line 266)
Specify the variable to solve for.
Error in
prababaseEOQ (line 13)
[T,t0]=solve(dTCdt0,dTCdT)
3 Comments
Dyuman Joshi
on 4 Apr 2024 at 5:51
You did not specify which variables are the unknowns.
What are the equations you are attempting to solve?
Why define variables as symbolic, just to overwrite them with numerical values?
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!