There's an error using input function in my computer , how do I solve it?

2 ビュー (過去 30 日間)
Lorenne
Lorenne 2018 年 3 月 19 日
編集済み: Stephen23 2018 年 3 月 19 日
clear all;
close all;
clc;
name=input('Enter your name:','s')
surname=input('Enter your surname:','s')
location=input('Enter your current location:','s')
fprintf('My name is %s%6s and I am currently in %s\n',name,surname,location)
  3 件のコメント
Lorenne
Lorenne 2018 年 3 月 19 日
Lorenne
Lorenne 2018 年 3 月 19 日
I got this error even after i reinstalled MATLAB

サインインしてコメントする。

採用された回答

Stephen23
Stephen23 2018 年 3 月 19 日
編集済み: Stephen23 2018 年 3 月 19 日
The error message is telling you that you have a file named input: have a look at the second line of the error message: what does it say? Change the name of the file to something else.
Tip: always use which to check if a name is in use.

その他の回答 (1 件)

Image Analyst
Image Analyst 2018 年 3 月 19 日
print is a built-in function, so it is not a good idea to call your m-file print.m. Rename the file and see if that fixes it.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ


Translated by