how to find the two unknowns from the nonlinear equation
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
Dyuman Joshi
2024 年 4 月 4 日
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?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!