What is a double matrix?
조회 수: 106 (최근 30일)
이전 댓글 표시
I have data that I need to convert into a double matrix. How do I do that ?
댓글 수: 5
Awais Saeed
2021년 12월 11일
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.
답변 (3개)
KSSV
2021년 12월 11일
If it is a string, read about str2num, str2double.
If it is a single, use double.
If it is a sym class, use double.
Awais Saeed
2021년 12월 11일
A = magic(4) % data type is double
s = single(A) % convert double to single
d = double(s) % convert single to double
whos
댓글 수: 0
Walter Roberson
2021년 12월 11일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!