disp(‘hello world’);

조회 수: 98 (최근 30일)
Hassan
Hassan 2023년 1월 27일
답변: Shakib 2025년 9월 22일
disp (hello world);
  댓글 수: 2
N/A
N/A 2025년 8월 1일
a=((hello world))
Unexpected 'world' in parentheses. When creating a matrix, use square brackets [].
Walter Roberson
Walter Roberson 2025년 8월 2일
That is incorrect. The function hello does not accept any input parameters, and does not return any outputs.

댓글을 달려면 로그인하십시오.

채택된 답변

Chris
Chris 2023년 1월 27일
편집: Chris 2023년 1월 27일
disp ('hello world');
hello world
Your apostrophes are wrong. How did you generate them? Here is your version:
disp (hello world);
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.

Error in connector.internal.fevalMatlab

Error in connector.internal.fevalJSON
You could also use double quotes: " "
  댓글 수: 1
DGM
DGM 2025년 8월 4일
편집: DGM 2025년 8월 20일
This is a common problem that happens when people copy-paste code that's presented on websites that use prettytext formatting. I don't know if there are other issues with localization that could cause the same thing, but there are countless websites full of curly-quoted code. It's up to you to watch out for bad quotes, hyphens, and spaces.
It doesn't show up in the forum editor, but these invalid characters should be highlighted by your editor.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Shakib
Shakib 2025년 9월 22일
disp command,
disp("Hello World")
Hello World

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by