symbolically differentiating of a function not to be mixed with other constants

Hi All
I was reading this link here
to derivate symbolically this equation :
p= c1*r +c2/r ;
the problem is that when you write : y=sym('y(t)') ;
then you can not define the function , to derivate and see the result , because it will only be like : diff(p(r), r) ;
but if I write the function as above , how can I make matlan know that r is the variable and the rest are just constants ?

 Respuesta aceptada

Más respuestas (0)

Etiquetas

Preguntada:

el 8 de Dic. de 2014

Respondida:

el 8 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by