Filter löschen
Filter löschen

how to find the two unknowns from the nonlinear equation

1 Ansicht (letzte 30 Tage)
M.Rameswari Sudha
M.Rameswari Sudha am 4 Apr. 2024
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 Kommentare
Dyuman Joshi
Dyuman Joshi am 4 Apr. 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?
M.Rameswari Sudha
M.Rameswari Sudha am 4 Apr. 2024
I changed the theta value 0 to 0.02. I got the answer. Thank you KSSV.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by