Effacer les filtres
Effacer les filtres

Plotting a function inside a m-file?

1 vue (au cours des 30 derniers jours)
Taha
Taha le 10 Oct 2012
I ran A3.m but it doesn't seem to create a correct plot.

Réponse acceptée

Razvan
Razvan le 10 Oct 2012
Function f2 returns only a number... Probably you want a vector, with one element for each element of x. In this case use
function F = f2(x)
F = 2*(x.^4)-3*(x.^2)+x-7;
end

Plus de réponses (1)

Taha
Taha le 10 Oct 2012
Thanks! =D

Catégories

En savoir plus sur Data Exploration dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by