how to calculate a derivative
Mostra commenti meno recenti
can some one guide me how to calculate a derivative and integration in matlab . can you please give a little example.
1 Commento
Jan
il 26 Feb 2012
Symbolically or numerically?
Risposta accettata
Più risposte (3)
Magdalena Glinska
il 16 Nov 2020
f = @(x) sin(x);
second_derivative_f = matlabFunction(diff(sym(f)));
Hamza saeed khan
il 24 Nov 2020
syms x
f = x;
diff(f,x)
why this code give me error as;
>>Error in diff (line 1)
syms x
4 Commenti
Dheeresh agarwal
il 22 Dic 2020
diff(f,1)
Walter Roberson
il 22 Dic 2020
You probably do not have the symbolic toolbox installed or licensed.
Also, you accidentally named your script diff.m which is going to conflict with calling diff() to differentiate.
belvia
il 12 Mag 2025
même chez moi le diff là ne donne pas
Steven Lord
il 12 Mag 2025
"même chez moi le diff là ne donne pas"
Please show us the exact code you're running and all the text displayed in red in the Command Window (and if there are any warning messages displayed in orange, please show us those too) that you see when you run that code. The exact text may be useful and/or necessary to determine what's going on and how to avoid the warning and/or error.
Achimsettythanmay
il 14 Nov 2022
Modificato: Walter Roberson
il 15 Nov 2022
syms x real
f = 1/x
int(f,1,2) % integration
diff(f) %differentiation
Categorie
Scopri di più su Special Values in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!