Borrar filtros
Borrar filtros

Matrix with decimal numbers

10 visualizaciones (últimos 30 días)
Emmanuelle
Emmanuelle el 11 de Oct. de 2012
Hi! I've done an operation with a Matrix.I've divided all the values and now I've a matrix that looks like this:
Block 1
0 0 0
0 0 0
0 0 0
0 0 0
But I want to get that result (with decimal numbers):
Block 1
0.5 0.5 0.3
0.4 0.7 0.8
0.3 0.6 0.9
0.5 0.9 0.4
Is this possible? Thanks in advance and greetings,
Emma

Respuesta aceptada

Matt J
Matt J el 11 de Oct. de 2012
Editada: Matt J el 11 de Oct. de 2012
Make sure your data is single or double precision, instead of an integer type (int16, uint32, etc...). Use "whos yourmatrix" or class(yourmatrix) to find out.
  1 comentario
Emmanuelle
Emmanuelle el 15 de Oct. de 2012
Hi! Thanks, at the end I've done this and it works:
A= double(X)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by