how to calculate max of symbolic variable?

조회 수: 3 (최근 30일)
shikhar
shikhar 2013년 5월 15일
syms f,
y=int(sin(pi*f),f,1,2) %results -2/pi
z=int(cos(pi*f),f,1,2); %results 0
max(y,z) % shows an error
since y and z are functions of symbolic variable (i.e f) ,max(y,z) shows an error
how do i calculate the maximum value? please help.......
or is there anyway so that i can find y and z without declaring f as syms?.....so that max(y,z) can be found?...please do reply

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 5월 15일
max(double([y,z]))
  댓글 수: 1
shikhar
shikhar 2013년 5월 15일
thanks a lot, it will solve a bunch of problems of mine....

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by