How do I incorporate an interval ?

How do I incorporate into this code that i want to see the local maximum and minimum in this interval x ∈ (-2, 1) ?
syms x
f = 2*x^3 - 3*x^2;
f1 = diff(f);
maxmin = solve(f1)
maxmin = 

 Réponse acceptée

Torsten
Torsten le 9 Jan 2024
Modifié(e) : Torsten le 9 Jan 2024
Add the line
maxmin = maxmin(maxmin>-2 & maxmin<1)
to your code.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Produits

Version

R2023b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by