What is a double matrix?
72 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have data that I need to convert into a double matrix. How do I do that ?
5 comentarios
Awais Saeed
el 11 de Dic. de 2021
Decimal point data (aka floating pointer numbers) can be represented as either single precision numbers or double precesion numbers. Single precision data takes 32bits in memory while double precision data takes 64bits. The greater the number of bits, the higher the accuracy. But you can easy tell that double precision costs you more memory. Read more here.
Respuestas (3)
KSSV
el 11 de Dic. de 2021
If it is a string, read about str2num, str2double.
If it is a single, use double.
If it is a sym class, use double.
3 comentarios
KSSV
el 11 de Dic. de 2021
Editada: KSSV
el 11 de Dic. de 2021
In MATLAB every variable has a class. You can get the class using the function class......the numbers i.e. floatingpoint numbers can be single or double. If your precipitation is a single, and you want it to double, yes use:
double(precipitaiton)
Awais Saeed
el 11 de Dic. de 2021
A = magic(4) % data type is double
s = single(A) % convert double to single
d = double(s) % convert single to double
whos
0 comentarios
Walter Roberson
el 11 de Dic. de 2021
retime() works fine with single precision.
dates = datetime('2000-01-01') + calmonths(0:3:35).'
data = randn(size(dates), 'single')
TT = timetable(dates, data)
TT5 = retime(TT, 'yearly', 'mean')
0 comentarios
Ver también
Categorías
Más información sobre Data Type Conversion 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!