Reputation: 1153
I am trying out some matlab code straight from the matlab documentation, but when I paste in into a clean matlab file and run it am getting 'Index exceeds matrix dimensions.' the code is to get a user input:
reply = input('Do you want more? Y/N [Y]: ', 's');
if isempty(reply)
reply = 'Y';
end
Upvotes: 0
Views: 3559
Reputation: 11
This problem occurs if a vector in the workspace is named "input", which causes MATLAB to try and find a subvector of "input" as opposed to calling the input command...
Upvotes: 1