필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Debashish Ray
Debashish Ray 2017년 10월 23일
댓글: Anurag Paul 2021년 9월 6일
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.

답변 (1개)

Karan Gill
Karan Gill 2017년 10월 23일
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
Anurag Paul
Anurag Paul 2021년 9월 6일
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by