how to calculate max of symbolic variable?

4 visualizaciones (últimos 30 días)
shikhar
shikhar el 15 de Mayo de 2013
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

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 15 de Mayo de 2013
max(double([y,z]))
  1 comentario
shikhar
shikhar el 15 de Mayo de 2013
thanks a lot, it will solve a bunch of problems of mine....

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by