Problem, when trying to differentate sin(f(x)), with variable x
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Andy
le 26 Avr 2014
Commenté : Azzi Abdelmalek
le 27 Avr 2014
Hello!
I would like to try some basic functions in Matlab. I faced two problems, which seems unable to solve for me.
If I type:
a=sin(3*x)
b=diff(a,x)
Then I run it:
a=sin(3*x)(3*x)
b=3*D(sin(3*x))(3*x)
I think it should be:
a=sin(3*x)
b=3*cos(3*x)
Please tell me what is wrong with my little code! Thank you!
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 26 Avr 2014
syms x
a=sin(3*x)
b=diff(a,x)
The result is
b =
3*cos(3*x)
0 commentaires
Plus de réponses (5)
Walter Roberson
le 27 Avr 2014
I think maybe you had something in your workspace that was interfering. Did you try clearing all variables, or restarting MATLAB?
0 commentaires
Voir également
Catégories
En savoir plus sur Special Values dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

