Unpacking analog input data packet in Matlab

Legacy support with Phidget21
miriha
Fresh meat
Posts: 2
Joined: Sun May 18, 2014 6:40 pm
Contact:

Unpacking analog input data packet in Matlab

Postby miriha » Tue May 27, 2014 11:30 am

Hi,
I set the data rate for Phidget 8/8/8 to 1ms and acquire the sensor value using
calllib('phidget21', 'CPhidgetInterfaceKit_getSensorValue', phid, n, dataptr);
where dataptr is initialized by dataptr = libpointer('int32Ptr', 0);
The dataptr.value shows the first data point correctly.
How can I unpack the remaining 7 data points?
Thank you,
Marty

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Unpacking analog input data packet in Matlab

Postby Patrick » Tue May 27, 2014 12:51 pm

You can't, this data is only available via the sensor change event - which is not compatible with Matlab.

-Patrick

miriha
Fresh meat
Posts: 2
Joined: Sun May 18, 2014 6:40 pm
Contact:

Re: Unpacking analog input data packet in Matlab

Postby miriha » Tue May 27, 2014 1:00 pm

That settles it, thanks Patrick.


Return to “Matlab”

Who is online

Users browsing this forum: No registered users and 1 guest