disp(‘hello world’);

disp (hello world);

2 Comments

a=((hello world))
Unexpected 'world' in parentheses. When creating a matrix, use square brackets [].
That is incorrect. The function hello does not accept any input parameters, and does not return any outputs.

Sign in to comment.

 Accepted Answer

Chris
Chris on 27 Jan 2023
Edited: Chris on 27 Jan 2023
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 Comment

DGM
DGM on 4 Aug 2025
Edited: DGM on 20 Aug 2025
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.

Sign in to comment.

More Answers (1)

disp command,
disp("Hello World")
Hello World

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Asked:

on 27 Jan 2023

Answered:

on 22 Sep 2025

Community Treasure Hunt

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

Start Hunting!