Matlab Output Format!

>> a=1
a =
1
>>
How to convert following format?
>> a=1
a=1
>>

1 comentario

DGM
DGM el 16 de Mzo. de 2021
I don't know that you can get such a format. You can remove the empty lines by specifying
format compact
but trying to get it all on the same line is something else.

Iniciar sesión para comentar.

Respuestas (1)

ANKUR KUMAR
ANKUR KUMAR el 16 de Mzo. de 2021

0 votos

You cannot format the output, but you can use disp to print in that way:
a=1;
disp('a=1')
disp(sprintf('a=%d',a))
You can use either of the last two commands.

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Mzo. de 2021

Comentada:

el 16 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by