Page 1 of 1

how to read .mat file?

Posted: Fri May 18, 2018 7:16 am
by liumutian
hi,can openvibe read .mat file?
my EEG data is .mat file?and I want to do offline analysis
how should i do to read it?
the .mat file is a 50000*6 matrix,6 is the number of channels,50000 is the samples.
I use matlab command 'csvwrite' to save it into .csv file.
but some error happened when i read it by CSV file reader box,here are the error code below:
[ ERROR ]At time 0.000 sec <Box algorithm::(0x0000773e, 0x00002851) aka CSV File Reader> {Error description} : {Error in the header of the file. Details: First column (-8.8655) is not well formed}, {Error type} : {ErrorType::Internal (code 2)}, {Error location} : {C:\ovm\sdk\plugins\processing\file-io\src\box-algorithms\csv\ovpCBoxAlgorithmOVCSVFileReader.cpp::81}
[ ERROR ] {Error description} : {Box algorithm <CSV File Reader> initialization failed}, {Error type} : {ErrorType::Internal (code 2)}, {Error location} : {C:\ovm\sdk\kernel\src\kernel\player\ovkCSimulatedBox.cpp::105}
[ ERROR ] {Error description} : {Failed to initialize player}, {Error type} : {ErrorType::Internal (code 2)}, {Error location} : {C:\ovm\sdk\kernel\src\kernel\player\ovkCPlayer.cpp::212}
[ ERROR ] The player could not be initialized.
[ ERROR ] The initialization of player failed. Check the above log messages to get the issue.
I linked the CSV file reader box to signal display box

Re: how to read .mat file?

Posted: Sat May 19, 2018 2:20 pm
by jtlindgren
Hi, you need to read the instructions about openvibe's expectations regarding csv format. You can find details from

http://openvibe.inria.fr/csv-file-format-description/

Those are for the new csv boxes; the old ones had a bit different conventions. You can click on a box and then press F1 to bring up its manual page.

OpenViBE cannot read a .mat file, one reason being afaik that the file format is not public but proprietary to Mathworks. Feel free to correct me if wrong.


Cheers,
Jussi