I'm facing problems to get the Matlab integration running.
I have a local Matlab installation (R2014a with Statistics Toolbox) and I was also able to start the mpicbg-matlab server for knime from within Matlab by running the startserver.m script. The console in Matlab shows:
Configuring on port: 1198
Registering with name: MatlabServer
MatlabWeb server started...
I guess that means that the server was started. I kept the settings for Matlab Scripting in Knime preferences as they are (Host: localhost, Port: 1198). However if I try to use the Open in Matlab node to push a data table from Knime to Matlab I get an error message in the Knime Console:
ERROR Open in Matlab Execute failed: Cannot run program "ls": CreateProcess error=2, The system cannot find the file specified
Any idea what the problem is? My OS is Windows 7 Enterprise 64bit.
I am sorry, I dont really know much about the Matlab integration (mostly working with R).
If you use the Matlab snippet (with its default configuration: mOut = kIn;) without cofiguration you should be able to send data to the Matlab server and back to KNIME. Does that work? If that doesnt work then the communication to the server is not correct and you get the error message:
Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused.
Open In pushes the data to the local installation (for R I know that you have to specify where the installation is located on your computer in KNIMEs preferences, but for Matlab I dont know how its works), which should open an instance with the data table from KNIME.
Here you can find a little bit of documentation:
I hope that information helps somehow, good luck!
I am not a Matlab user and unfortunately my colleague using mainly the Martlab integration has left some time ago. However, I hope some of my comments could help you in setting it up!?
If you have the Matlab server running, a simple Matlab snippet with the default script line:
mOut = kIn;
should send the data from KNIME to the server and back to KNIME. If this doesnt work then the communication between the server and KNIME is not working. If I do this I get this type of error message:
ERROR Matlab Snippet Execute failed: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused
The Open In node saves the KNIME table to temp file and calls up the local Matlab installation. For R I know that you have to specify the path, where the program is installed, but for Matlab I dont know how it works. Matlab then loads the temp file. Maybe here something goes wrong!?
A little bit of documentation for setting up the Matlab server you can find here:
Thanks for your help. Meanwhile I played around with the Matlab Scripting workflow from the Knime examples server. All the Matlab Snippet nodes and the Matlab Plot nodes in this workflow are properly executed and they do their job. So obviously communication between Knime and Matlab is not a problem. However in the same example workflow there is one Open in Matlab node and this still gives the error message described in my first post upon execution.
I think for the moment I will work with the Matlab Snippet node. Thanks again for your suggestions.
the open in Matlab node is currently only working in mac, since it uses unix system commands to find the executable.
I am currently working on it to have a more generic solution