0

I have created a Ruby on Rails web application. This application created an Input-Data file at the end for a Problem which is formulated in Matlab. Now I want start the Matlab Problem with the help of a button in the web application. How can I start Matlab from Ruby on Rails? I tried the following without success:

    system "C\\Programme\\MATLAB\\R2016a\\bin\\matlab Main_Application.m"

Has anyone a solution for my problem?

G.Boer
  • 3
  • 2
  • You need to use "-r" option if you want to run specific code on MATLAB startup. See http://www.mathworks.com/help/matlab/matlab_env/startup-options.html – Navan May 23 '16 at 18:02
  • Also, you will want to think about non-blocking calls (e.g. spawning of processes); for a Rails app a gem like [sidekiq](http://sidekiq.org), and/or [Active Job](http://guides.rubyonrails.org/active_job_basics.html) would be useful. – zeeMonkeez May 23 '16 at 18:09
  • It works! Thanks for help! – G.Boer May 26 '16 at 12:51

0 Answers0