x = [-2:0.01:1];f = (x.^2) -x +1 - (exp(-x));x1 = -1.9;f(x1)
this gives me the error:
Array indices must be positive integers or logical values
How can I manage to extract the right value of f at x1?
thanks!
arrayfunctionlogical values
x = [-2:0.01:1];f = (x.^2) -x +1 - (exp(-x));x1 = -1.9;f(x1)
Best Answer