Assalam U Alaikum!
I am trying to use matlab scripting box in open vibe to run a matlab function on the start of a scenario.
Matlab scripting box provides us facilty to call 3 matlab functions while:
1. Initializing function.
2. Processing function.
3. Uninitializing function.
I am using the example of the tutorials of the open vibe. But these matlab functions are not being called.
I get the error message as:
No such method found with the argument of type 'struct'.
But the same example exactly runs on the tutorial shown at openvibe website.
I shall be thankful if someone will help regarding this issue.
thanks a lot.
Problem with Matlab scripting box in openvibe

 Posts: 778
 Joined: Tue Dec 04, 2012 3:53 pm
 Location: INRIA Rennes, FRANCE
Re: Problem with Matlab scripting box in openvibe
Hello Ehatisham,
to address this, we need a bit more information:
 Which version of OpenViBE and Matlab are you using?
 Which tutorial exactly causes this problem?
 Please tell us what step of the tutorial you are at when you get this issue?
Cheers,
Jussi
to address this, we need a bit more information:
 Which version of OpenViBE and Matlab are you using?
 Which tutorial exactly causes this problem?
 Please tell us what step of the tutorial you are at when you get this issue?
Cheers,
Jussi
Re: Problem with Matlab scripting box in openvibe
hello
I have the same problem
 Which version of OpenViBE and Matlab are you using?
openvibe 0.15.0
matlab R2012a
 Which tutorial exactly causes this problem?
first tutorial "signal filter"
 Please tell us what step of the tutorial you are at when you get this issue?
from the initialization step
undefined function 'tuto1_signal_filter_Initialize' for input argument of type 'struct'
and the same occured at process and uninitialize steps
thanks in advance
I have the same problem
 Which version of OpenViBE and Matlab are you using?
openvibe 0.15.0
matlab R2012a
 Which tutorial exactly causes this problem?
first tutorial "signal filter"
 Please tell us what step of the tutorial you are at when you get this issue?
from the initialization step
undefined function 'tuto1_signal_filter_Initialize' for input argument of type 'struct'
and the same occured at process and uninitialize steps
thanks in advance

 Posts: 778
 Joined: Tue Dec 04, 2012 3:53 pm
 Location: INRIA Rennes, FRANCE
Re: Problem with Matlab scripting box in openvibe
Hello Sasa,
your problem points to a direction that Matlab is not able to find the .m file in question. There could be a problem in the paths you provide to the box. If you're on Windows, you could use 'Process Explorer' to find out if Matlab is able to open the .m file. On Linux, the command is 'strace'. Seeing from those tools where it looks for the file could be used as a clue to debug this.
I also recommend trying a later version of OpenViBE, such as 0.16.0 or even git version and see if that makes any difference. There have been some tweaks to the Matlab boxes, for example.
Good luck,
Jussi
your problem points to a direction that Matlab is not able to find the .m file in question. There could be a problem in the paths you provide to the box. If you're on Windows, you could use 'Process Explorer' to find out if Matlab is able to open the .m file. On Linux, the command is 'strace'. Seeing from those tools where it looks for the file could be used as a clue to debug this.
I also recommend trying a later version of OpenViBE, such as 0.16.0 or even git version and see if that makes any difference. There have been some tweaks to the Matlab boxes, for example.
Good luck,
Jussi
Re: Problem with Matlab scripting box in openvibe
Thank you for answering
but after path modifications the problem now is that the initialization doesn't work while the uninitialization works although they are in the same location and I haven't changed the given names or paths
as demonstrated in the following log
[ ERROR ] At time 0.000 sec <Box algorithm::Signal filter> Cannot open 'C:\'Program Files (x86)'\openvibe\share\openvibe\scenarios\boxtutorials\matlab\tuto1_signal_filter_Initialize.m'
[WARNING] Box algorithm <Signal filter> has been deactivated because initialization phase returned bad status
[ INF ] At time 4.602 sec <Box algorithm::Signal filter>
 MATLAB BUFFER  INFO 
Matlab uninitialize function has been called.
so what could be the problem?
thanks in advance
but after path modifications the problem now is that the initialization doesn't work while the uninitialization works although they are in the same location and I haven't changed the given names or paths
as demonstrated in the following log
[ ERROR ] At time 0.000 sec <Box algorithm::Signal filter> Cannot open 'C:\'Program Files (x86)'\openvibe\share\openvibe\scenarios\boxtutorials\matlab\tuto1_signal_filter_Initialize.m'
[WARNING] Box algorithm <Signal filter> has been deactivated because initialization phase returned bad status
[ INF ] At time 4.602 sec <Box algorithm::Signal filter>
 MATLAB BUFFER  INFO 
Matlab uninitialize function has been called.
so what could be the problem?
thanks in advance

 Posts: 778
 Joined: Tue Dec 04, 2012 3:53 pm
 Location: INRIA Rennes, FRANCE
Re: Problem with Matlab scripting box in openvibe
One thing that looks suspicious is that in
Cannot open 'C:\'Program Files (x86)'\openvibe\share\openvibe\scenarios\boxtutorials\matlab\tuto1_signal_filter_Initialize.m'
There is an extra ' in the middle of that path.
Cheers,
Jussi
Cannot open 'C:\'Program Files (x86)'\openvibe\share\openvibe\scenarios\boxtutorials\matlab\tuto1_signal_filter_Initialize.m'
There is an extra ' in the middle of that path.
Cheers,
Jussi

 Posts: 778
 Joined: Tue Dec 04, 2012 3:53 pm
 Location: INRIA Rennes, FRANCE
Re: Problem with Matlab scripting box in openvibe
I found out there was a problem with the Matlab boxes if the working directory names contained any spaces. This has now been fixed in git. As your report helped us to discover this problem, thank you.
If the same issue is behind the boxes not working for you, you can try to solve it by just moving the scenario .xml files to a directory whose path contains no spaces in any of the names.
Cheers,
Jussi
If the same issue is behind the boxes not working for you, you can try to solve it by just moving the scenario .xml files to a directory whose path contains no spaces in any of the names.
Cheers,
Jussi
Re: Problem with Matlab scripting box in openvibe
this really seems to be the problem
thank you very much
thank you very much
Re: Problem with Matlab scripting box in openvibe
Hi,
I am trying to open the Matlab box tutorial scenario but unable to do so. I am facing the error. I will explain step by step below;
1 I open the Matlab scripting tutorial file named tuto1signalfilter.xml
2 Then I configure the Matlab scripting box as shown in the screenshot attached
3 When I try to save the scenario I get the following error
[ERROR] {Error description} : {Failed to open file C:/Program Files (x86)/openvibe2.1.0/share/openvibe/scenarios/boxtutorials/matlab/tuto1signal
filter.xml}, {Error type} : {ErrorType::BadFileRead (code 40)}, {Error location{C:\ovm\sdk\kernel\src\kernel\scenario\ovkCScenarioManager.cpp::501}
I am using OpneVibe 2.1.0 and Matlab R2015a 32bit. The operating system is Windows 10.
Any help to figure out this issue will be appreciated. Thank you
I am trying to open the Matlab box tutorial scenario but unable to do so. I am facing the error. I will explain step by step below;
1 I open the Matlab scripting tutorial file named tuto1signalfilter.xml
2 Then I configure the Matlab scripting box as shown in the screenshot attached
3 When I try to save the scenario I get the following error
[ERROR] {Error description} : {Failed to open file C:/Program Files (x86)/openvibe2.1.0/share/openvibe/scenarios/boxtutorials/matlab/tuto1signal
filter.xml}, {Error type} : {ErrorType::BadFileRead (code 40)}, {Error location{C:\ovm\sdk\kernel\src\kernel\scenario\ovkCScenarioManager.cpp::501}
I am using OpneVibe 2.1.0 and Matlab R2015a 32bit. The operating system is Windows 10.
Any help to figure out this issue will be appreciated. Thank you
 Attachments

 OpenVibeScen.png (123.47 KiB) Viewed 4693 times