Problem about proximity in matlab

2 Ansichten (letzte 30 Tage)
C Zeng
C Zeng am 26 Okt. 2012
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
C Zeng
C Zeng am 26 Okt. 2012
Oh, when I use class, it is converted to uint16. I need to figure out why?
However I only define uint32 at the beginning. So what could be a reason for converting to uint16? I am confused.
Image Analyst
Image Analyst am 27 Okt. 2012
Calling class() causes no conversion. It must have got converted some other way.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 26 Okt. 2012
Somewhere along the way, you must have converted it to uint16, perhaps without realizing that you did so.
  4 Kommentare
C Zeng
C Zeng am 26 Okt. 2012
Thanks, Walter. I think it somewhere convert to double, however, double is more than uint32, right? Does it matter?
C Zeng
C Zeng am 26 Okt. 2012
Now, I shut all programs off and restart it, seems that there is no such convert data type problems.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by