how to find the two unknowns from the nonlinear equation
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Dyuman Joshi
le 4 Avr 2024
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?
Réponses (0)
Voir également
Catégories
En savoir plus sur Optimization dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!