What is difference between x='93'; and x=93; ?

Basically I wanna know about each and every detail of MATLAB... So please put details here... What is difference between x=93; x='93';
Thanks in advance...

 Respuesta aceptada

Adam
Adam el 26 de Ag. de 2016
x = 93
creates a numeric variable
x = '93'
creates a char variable containing a string.
This should be very easy to see from just trying it in the command window though!

Más respuestas (1)

Guillaume
Guillaume el 26 de Ag. de 2016

0 votos

I wanna know about each and every detail of MATLAB. Read the documentation or grab a book from the library.
For your specific question, see fundamental matlab classes. x = 96, creates a numeric variable (a double to be specific), x = '96' creates a char variable.

Categorías

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

Etiquetas

Preguntada:

el 26 de Ag. de 2016

Respondida:

el 26 de Ag. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by