find the minimum value of y for positive vales of x

10 visualizaciones (últimos 30 días)
Aaron Aguilar
Aaron Aguilar el 3 de Sept. de 2020
Comentada: per isakson el 3 de Sept. de 2020
i have xmin=min(y(x>0)); where x=[-100:100] & y =x^3+60x^2-50 it gives me -50 which is wrong
aloso i have xmin=min(y(0:x(end))); where x=[-100:100] & y =x^3+60x^2-50 it gives me -50 which is wrong answer
any ideas? is my expression wrong ?

Respuesta aceptada

per isakson
per isakson el 3 de Sept. de 2020
Try this
%%
x = (-100:100);
y = x.^3+60*(x.^2)-50;
%%
xmin = min(y(x>0))
which returns
xmin =
11
>>

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by