Problem about proximity in matlab
Ältere Kommentare anzeigen
Hi, all,
I defined an array like S=ones(N,x,'uint32'). And I give values to all of them. However I find out the maximum value is 65535 which is 2^16 not 2^32.
I tried 'uint64' but the limit is still 65535, why is that?
Thanks.
4 Kommentare
Walter Roberson
am 26 Okt. 2012
How are you assigning the values?
>> S = ones(1,1,'uint32')
S =
1
>> S(1) = 99999
S =
99999
>> S(1)
ans =
99999
>> class(S)
ans =
uint32
C Zeng
am 26 Okt. 2012
C Zeng
am 26 Okt. 2012
Image Analyst
am 27 Okt. 2012
Calling class() causes no conversion. It must have got converted some other way.
Antworten (1)
Image Analyst
am 26 Okt. 2012
0 Stimmen
Somewhere along the way, you must have converted it to uint16, perhaps without realizing that you did so.
Kategorien
Mehr zu Data Type Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!