how do I plot this anonymous function?

34 visualizaciones (últimos 30 días)
Andrew Serra
Andrew Serra el 26 de Abr. de 2016
Comentada: yaswanth gaddipati el 21 de Oct. de 2020
Hi i can't seem to figure this problem out and i thought i should ask someone.
When i make the anonymous function: MyFunct = @x 3*x^2 - 2*x + 5
I don't exaclty know how to approach this problem when it comes to plotting it. I'm trying to set the x-range to [-6:1:6] and I'm trying to call my anonymous function(MyFunct) into the y-value for the plot. how would i go about writing these lines code to plot this function?
Thanks

Respuestas (1)

Torsten
Torsten el 26 de Abr. de 2016
f=@(x)3*x.^2 - 2*x + 5;
fplot(f,[-1 1]);
Best wishes
Torsten.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by