what is the error?

1 view (last 30 days)
mohammed
mohammed on 29 Dec 2014
Commented: Star Strider on 29 Dec 2014
when i run my program and try to get product of vector matrix error message appear
</matlabcentral/answers/uploaded_files/23122/Capture.PNG> but when i clear and try prod function there is no error

Accepted Answer

Star Strider
Star Strider on 29 Dec 2014
When you get the error, type this in the Command Window:
which prod -all
You may have a variable named ‘prod’ that is ‘overshadowing’ the MATLAB prod function.
If one (likely the first) in the list that returns in the Command Window is:
prod is a variable.
That is the problem. Rename that variable to something other than ‘prod’ and the problem will not recur.
  2 Comments
mohammed
mohammed on 29 Dec 2014
thanks alot
Star Strider
Star Strider on 29 Dec 2014
My pleasure!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!