MATLAB Answers

the exp function does not work

22 views (last 30 days)
It may look like a simple problem but I cannot get my way through. When using exp(2), I get an "Index exceeds matrix dimensions" error. I have always used the exp function, why now I get this error?
Thank you for your help, Alessio.

  0 Comments

Sign in to comment.

Accepted Answer

per isakson
per isakson on 24 Apr 2014
Edited: per isakson on 24 Apr 2014
>> exp(2)
ans =
7.3891
I guess exp is "shadowed" on your system. Run
>> which exp
built-in (C:\Program Files\MATLAB\R2013a\toolbox\matlab\elfun\@double\exp) % double
What do you get?

  2 Comments

Sebastiano delre
Sebastiano delre on 24 Apr 2014
I have restarted matlab and now it works fine...

Sign in to comment.

More Answers (0)

Sign in to answer this question.