Plotting a function inside a m-file?

 Akzeptierte Antwort

Razvan
Razvan am 10 Okt. 2012

0 Stimmen

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

Weitere Antworten (1)

Kategorien

Mehr zu Graphics Objects finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 10 Okt. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by