Info

This question is closed. Reopen it to edit or answer.

request user for input

7 views (last 30 days)
Muazma Ali
Muazma Ali on 13 Dec 2017
Closed: MATLAB Answer Bot on 20 Aug 2021
hi!
dont know why I am getting error here, shouldnt i think, its quite a simple syntax:
svar=input('answer yes:y or no:n. ', 's');
Index exceeds matrix dimensions.
  3 Comments
Muazma Ali
Muazma Ali on 13 Dec 2017
it was the whole error message I got..
KL
KL on 14 Dec 2017
No, it's not. Complete error message means all of the red text.

Answers (1)

Walter Roberson
Walter Roberson on 14 Dec 2017
You have accidentally created a variable named input so when you think you are calling the function index you are actually trying to access the variable.

Tags

Community Treasure Hunt

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

Start Hunting!