how to differentiate a function and then evaluate at a predefined variable?
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
If i wanted to differentiate f=x*y with respect to y and then evaluate at a value y = 6 say. how would i do this? i would write the code syms y f=x*y g=diff(f) but then how would i go about the evaluation because it seems y is now fixed as a symbol. Also, i have this as predefined input values x,y so i would like to use the y value predefined as i'm writing it in a function
0 commentaires
Réponse acceptée
madhan ravi
le 6 Nov 2018
syms x y
f=x*y
A=diff(f,y)
subs(A,y,6)
3 commentaires
madhan ravi
le 6 Nov 2018
Anytime :) , I understood that you needed an example to know the functions , Happy Matlab(ing)
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!