About the matlab scripts

About the GUI application to design signal processing pipelines
Post Reply
shelldream
Posts: 35
Joined: Thu Sep 20, 2012 9:40 am

About the matlab scripts

Post by shelldream »

hi,
I am a beginner to this software.Yesterday I found that if I add a temporal filter to the matlab scipts in tuto3_sinus_generater.xml .All the outputs of filter were zeros!
I want to know what's wrong with this script.
Best,
Shelldream :D

fabien.lotte
Posts: 112
Joined: Sun Mar 14, 2010 12:58 pm

Re: About the matlab scripts

Post by fabien.lotte »

I don't know this script but given its name I guess it generates a perfect sinus signal at a given frequency, so if you filter it in another frequency (using the temporal filter), well, the output should actually be 0... Is that what you do?

shelldream
Posts: 35
Joined: Thu Sep 20, 2012 9:40 am

Re: About the matlab scripts

Post by shelldream »

Hi,fabien.lotte
Thank you for your help. But I checked my filter ,it was all right.Here I attach my scenarios and the matlab files. I think the problems result from the format of the matlab script output whic is different from the dafault format of data in this softwar.
I tried to attach the matlab files ,but failed.You can still find these matlab files in the ……\share\openvibe-scenarios\box-tutorials\matlab,because my scenarios call the same matlab functions as the tutorials.
Could you help me to find the problems?
Best,
shelldream
Attachments
foram_matlab.xml
(16.54 KiB) Downloaded 228 times
foram_matlab1.xml
(23.74 KiB) Downloaded 235 times

fabien.lotte
Posts: 112
Joined: Sun Mar 14, 2010 12:58 pm

Re: About the matlab scripts

Post by fabien.lotte »

Dear Shelldream,

I've tried your scenario (actually it was the first time for me using the Matlab scripting box), and I observed the same problem. And indeed your temporal filter looks correct. I actually tried different cutoff frequency but whatever the frequencies I used the output was zero. So you are right there is probably a problem with the matlab scripting box (or maybe with the temporal filter one?). When using simpleDSP on the data produced by the matlab scripting box, everything went well, but when using the temporal filter, then problems arised. So I guess it is probably due to a timing issue or a problem with the sampling frequency. However I checked the matlab files and the sampling frequency seemed correct so I don't know what could be the problem. Maybe Laurent would have a clue since he programmed the matlab scripting box: Laurent, any idea?

best,
Fabien

lkorczowski
Posts: 3
Joined: Thu Dec 06, 2012 2:47 pm

Re: About the matlab scripts

Post by lkorczowski »

Dear OpenVibe community :

I think that I have a similar problem with the Matlab toolbox. I've designed a Matlab script for artifact cancellation using a reference electrode (adaptive LMS).

It seems that the output of the box has a timing issue that makes crash many boxes. However the output can be visualized and exported in .ov or .csv file but the same problem occurs when I use this exported .ov file.

Example of error message on a CSP scenario using the adaptive filter:
[ ERROR ] At time 0.250 sec, plugin code caused a crash 1 time(s)
[ ERROR ] [name:Left Stimulation epoching]
[ ERROR ] [identifier:(0x00007f0e, 0x000065cd)]
[ ERROR ] [algorithm class identifier:(0x426163d1, 0x324237b0)]
[ ERROR ] [location:processing callback]
[ ERROR ] At time 0.250 sec, plugin code caused a crash 2 time(s)
[ ERROR ] [name:Left Stimulation epoching]
[ ERROR ] [identifier:(0x00007f0e, 0x000065cd)]
[ ERROR ] [algorithm class identifier:(0x426163d1, 0x324237b0)]
[ ERROR ] [location:processing callback]
[ ERROR ] At time 0.250 sec, plugin code caused a crash 3 time(s)
[ ERROR ] [name:Left Stimulation epoching]
[ ERROR ] [identifier:(0x00007f0e, 0x000065cd)]
[ ERROR ] [algorithm class identifier:(0x426163d1, 0x324237b0)]
[ ERROR ] [location:processing callback]
[ ERROR ] At time 0.250 sec, plugin code caused a crash 4 time(s)
[ ERROR ] [name:Left Stimulation epoching]
[ ERROR ] [identifier:(0x00007f0e, 0x000065cd)]
[ ERROR ] [algorithm class identifier:(0x426163d1, 0x324237b0)]
[ ERROR ] [location:processing callback]
[ ERROR ] At time 0.250 sec, plugin code caused a crash 5 time(s)
[ ERROR ] [name:Left Stimulation epoching]
[ ERROR ] [identifier:(0x00007f0e, 0x000065cd)]
[ ERROR ] [algorithm class identifier:(0x426163d1, 0x324237b0)]
[ ERROR ] [location:processing callback]
[ FATAL ] This plugin has been disabled !
[WARNING] <Player::can not reach realtime> 2 second(s) late...
[WARNING] <Player::can not reach realtime> 1 second(s) late...
[ INF ] <Player::can not reach realtime> 0 second(s) late...
I made a simple scenario in which OpenVibe crash (LMS_crash.zip).
Here is a EEG recordings (14 channels) :
https://docs.google.com/file/d/0ByqLgre ... sp=sharing

Do you have a idea how can I handle this ?

Thank you in advance

Korczowski L.
Engineer Student
INRIA-LORIA Nancy
Attachments
LMS_crash.zip
(5.44 KiB) Downloaded 228 times

lkorczowski
Posts: 3
Joined: Thu Dec 06, 2012 2:47 pm

Re: About the matlab scripts

Post by lkorczowski »

Hi,

I updated my LMS filter scenario and the matlab files to correct some stuff. (LMS_filter_v2.zip)
I still have the same issue. As one can see, even if I set the sample rate of my outputs in the matlab scripting box, the sample rate is set to zero in the exported data. (problem_OV_matlab_small.JPG)

Best,

Louis
Attachments
Sample Rate issue example in matlab scripting box
Sample Rate issue example in matlab scripting box
problem_OV_matlab_small.JPG (194.58 KiB) Viewed 7149 times
LMS_filter_v2.zip
(9.65 KiB) Downloaded 207 times

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: About the matlab scripts

Post by jtlindgren »

Hello all,

there's definitely something fishy in all this. We're looking into it.


Cheers,
Jussi

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: About the matlab scripts

Post by jtlindgren »

It seems that the sampling rate was not parsed properly if it was set inside Matlab. This has been fixed in r3522.


Happy hacking,
Jussi

Post Reply