- #1
sloan13
- 73
- 0
Homework Statement
The problem was "Plot the following equation with MatLab, for values of x from -3 to 6.
Homework Equations
y = x^4 - 4x^3 - 6x^2 + 15
The Attempt at a Solution
I created a function.
function r = graph(x)
for i = 1:x
r(i) = i^4 - 4*i^3 - 6*i^2 + 15;
end
Then I passed fplot(graph(10), [0 10000]) through the command prompt.
It returned
Error using fcnchk (line 107)
FUN must be a function, a valid string expression,
or an inline function object.
Error in fplot (line 61)
fun = fcnchk(fun);
Any ideas on what this means?