Problem converting .psdata to .mat

Post your MATLAB discussions here
Post Reply
bahamut314
Newbie
Posts: 0
Joined: Sun Feb 14, 2016 5:31 am

Problem converting .psdata to .mat

Post by bahamut314 »

Hello,

We're having trouble reading the resultant .mat files after converting from the .psdata file. The .psdata was taken from a Picoscope 3406D MSO using software version 6.11.10.1608 and has the following properties:

Sample interval: 1 ns
Sample rate: 1 GS/s
No. samples 100,000,004
Channel A
Range +/-5V
Coupling DC
Digital Channels: Off

When trying to load the data in MATLAB, it gives the error:
Error using load
Unable to read MAT-file ..\filename.mat
File may be corrupt.

I have also tried Octave and it gives a similar error. The reason we need to use the binary file format is for the large dataset. I think CSV and txt are both limited to 1 million per channel. Any ideas?

Thanks.

Hitesh

Re: Problem converting .psdata to .mat

Post by Hitesh »

Hi bahamut314,

The PicoScope 6 software saves to MATLAB v4 file format. Unfortunately, MATLAB is only able to handle arrays with 100 million elements or less when saved in this format.

Please e-mail support@picotech.com and we will look to assist you further. It would be helpful if you can indicate which version of MATLAB you are using and whether it is 32-bit or 64-bit.

Regards,

herwigk
Newbie
Posts: 0
Joined: Tue May 24, 2016 6:00 am

Re: Problem converting .psdata to .mat

Post by herwigk »

Hello,

I have the same problem here.
(PicoScope 5444b, channels A&B&C, 500ms/div, 5mio samples total)

I use 3 channels with 5.000.000 samples each.

With R6.10.18 I got a truncated mat-file with partly invalid data.
(Only about 1.600.000 samples for A and B each and about 490.000 samples for C)

With R6.11.12 and R6.12.2beta I get the complete channels A and B with correct data, but for channel C I get the
message (GNU octave; no Matlab available):

Code: Select all

error: load: reading matrix data for 'C'
error: load: trouble reading binary file 'D:/Audi_MLB_Redesign/Test/20160519_Webasto_8Nm_gebremst/20160519-0002e_ungebremst.mat'
Is there any other possibility to get at least an excerpt (of the end) of the data into a correct mat-file?

Thank You.

Hitesh

Re: Problem converting .psdata to .mat

Post by Hitesh »

Hi herwigk,

There should be a fix in the next PicoScope 6.12 version which should resolve the issue.

There are two possible workarounds for this:

1. Enable channel D, then load only channels A, B and C into MATLAB from the file using the command prompt or a script.

2. Using PicoScope Beta 6.12.2, export the data to csv or text file and then use the Import tool in MATLAB to load the data in.

The second option might take a bit longer due to file size.

Hope this helps.

herwigk
Newbie
Posts: 0
Joined: Tue May 24, 2016 6:00 am

Re: Problem converting .psdata to .mat

Post by herwigk »

Thank you Hitesh,

I already tried Beta 6.12.2 with no success with mat files.
But I just tried as you suggested to save the data as txt file and it worked (so far).

The errors still present are:
- The first column, representing the time, starts with unit (ms) but the values switch then to (s) without notice, so I
would read out the wrong time stamps.
- Somewhere later on (at time 2.655116s) the header is repeated in the data stream, but now with time unit (s). The
measured data values at that timestamp are lost, which would represent a discontinuity in time.

For now I can continue with this workaround. Thank You!

Best regards, Herwig

Hitesh

Re: Problem converting .psdata to .mat

Post by Hitesh »

Hi Herwig,

Could you please send the corresponding PicoScope psdata file to support@picotech.com and I can check the export to see if I can repeat the issue described.

Thanks,

herwigk
Newbie
Posts: 0
Joined: Tue May 24, 2016 6:00 am

Re: Problem converting .psdata to .mat

Post by herwigk »

Hello Hitesh,

is there a possibility to upload the file somewhere? The file size is 12MB.

Regards,
Herwig

Hitesh

Re: Problem converting .psdata to .mat

Post by Hitesh »

Hi Herwig,

Did you try e-mailing it to support@picotech.com?

You can save one waveform if you have multiple waveforms in a file and post it here.

Regards,

Post Reply