clear; clcx = -1.612 : 0.01 : -1.322 ;for n = 1:1:length(x) f(x) = 8 * x(n)^3 - 2 * x(n)^2 - 15 * x(n) + 11 ; g(x) = -10 * x(n)^3 + 10 * x(n) - 13 ;endfigure(1)plot(x,f(x), x,g(x))
MATLAB: Am I getting the error of “Array indices must be positive integers or logical values.” in the f(x) line
homeworkMATLAB
Best Answer