How to solve f'(x)=0?
47 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to find f'(x)=0
My function is f(x)=2x^2+4x. Then in MATLAB I wrote f2=diff(f);
Next step is to calculate f'(x)=0, but I do not know how. I tried a few examples I found with fzero() but it did not work.
Thanks!
3 Commenti
Ela Markovic
il 29 Nov 2022
How about:
fun = @f; % function
x0start = 2; % initial point
x0 = fzero(fun,x0start);
disp(x0)
function y = f(x)
y = 4*x+4;
end
Risposte (1)
Vedere anche
Categorie
Scopri di più su Number Theory in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!