Info

此问题已关闭。 请重新打开它进行编辑或回答。

request user for input

1 次查看(过去 30 天)
Muazma Ali
Muazma Ali 2017-12-13
关闭: MATLAB Answer Bot 2021-8-20
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 个评论
Muazma Ali
Muazma Ali 2017-12-13
it was the whole error message I got..
KL
KL 2017-12-14
No, it's not. Complete error message means all of the red text.

回答(1 个)

Walter Roberson
Walter Roberson 2017-12-14
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.

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by