Error on mathlab, and I have no idea how to correct it, me out

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
vienhuynh
Messages
2
Reaction score
0
error on mathlab, and I have no idea how to correct it, please help me out :(

Hello guys, I was using a class assignment using matlab, and the code is provided by the professor. All we need to do is use plug the function in and run it. But for some reason, I got this error:
? Error using ==> mpower
Inputs must be a scalar and a square matrix.

Error in ==> @(x)(e^(cos(x))+8*x^2-3-x-4)^(1/5)


Error in ==> fpi at 5
x(i+1)=g(x(i));

I don't see a problem in that, can someone point it out for me?
 
Physics news on Phys.org


Thank you for your reply, I found the answer. Seems like in matlab, there is no "e", have to use exp() instead.