how to calculate max of symbolic variable?

21 次查看(过去 30 天)
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]))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by