Changing the data type of an array
- From: "Fernando Gomez" <fernando.pancorbo@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 12:49:22 -0400
Hi,
I have a very specific question. I am sure there must be a way to do
this efficiently yet I have been unable to do so.
I am using MATLAB to communicate with a remote instrument (logic
analyzer). That instrument provides the result of the measurement as
an array of unsigned bytes. But as I know that it is indeed an array
of 16 bit signed integers (int16), I have to go through a data
conversion process. To do the conversion, currently I am reading the
byte array with a "for" loop which builds a new array whose length is
have the original array length. As you can imagine, this is way too
slow when the data measured is large. I wonder if there is a
better/faster way of doing this with MATLAB (I bet there is, but I
have been unable to find it). For instance, if I was doing this in C,
I would just use an integer pointer that would point to the byte
array. Any help would be appreciated.
Thanks,
Fernando.
.
- Follow-Ups:
- Re: Changing the data type of an array
- From: Randy Poe
- Re: Changing the data type of an array
- Prev by Date: Re: Saving Images in Text File
- Next by Date: Re: Array of matrixes???
- Previous by thread: ButtonDownFcn
- Next by thread: Re: Changing the data type of an array
- Index(es):
Relevant Pages
|