disp (hello world);

2 comentarios

N/A
N/A el 1 de Ag. de 2025
a=((hello world))
Unexpected 'world' in parentheses. When creating a matrix, use square brackets [].
Walter Roberson
Walter Roberson el 2 de Ag. de 2025
That is incorrect. The function hello does not accept any input parameters, and does not return any outputs.

Iniciar sesión para comentar.

 Respuesta aceptada

Chris
Chris el 27 de En. de 2023
Editada: Chris el 27 de En. de 2023

0 votos

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 comentario

DGM
DGM el 4 de Ag. de 2025
Editada: DGM el 20 de Ag. de 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.

Iniciar sesión para comentar.

Más respuestas (1)

Shakib
Shakib el 22 de Sept. de 2025

0 votos

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

Categorías

Más información sobre Graphics Object Programming en Centro de ayuda y File Exchange.

Preguntada:

el 27 de En. de 2023

Respondida:

el 22 de Sept. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by