how to calculate the maximum value of a function assigned to a 'sym'?

I solved a differential equation and stored the solution in y which is of type 'sym'. But I can't use the 'max' function with it. following is the code:-
eqn= 'Dy+y/(8*(10^5)*5*(10^(-6)))=12/(8*(10^5))';
inits= 'y(0)=0';
y=dsolve(eqn,inits,'t');
soln= ['y(t)=',char(simplify(y))];
disp(soln)
ezplot(y)
max(y)
dy=diff(y);
max(dy)
The 'max' functions are not working.

Antworten (1)

Karan Gill
Karan Gill am 23 Okt. 2017

1 Stimme

The max function does not find the maximum of a symbolic function. Please read the doc on max.
Your question is a math question, not a MATLAB question. You can look up a reference like http://clas.sa.ucsb.edu/staff/lee/Max%20and%20Min's.htm

1 Kommentar

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 23 Okt. 2017

Kommentiert:

am 6 Sep. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by