Qprocess and Matlab

  • Greetings,

    I recently tried to connect Qt and Matlab using engine . Unfurtonately, I wasn't able due to some incompatibilities. Right now I'm facing a different problem using Qprocess.

    In Matlab, I have the following code. The file is called tedaldi_cal.m.

    [cur_a_params,cur_w_params,stats] = run_ae(rec_path);

    Where rec_path is the the path to the files that I want to read (a text file). In the code below, I'm able to open Matlab, but I don't know how could I pass the parameters to run the program.

    QProcess* p = new QProcess(NULL);
         QString program = "C:/Program Files/MATLAB/R2016b/bin/matlab.exe";
         QStringList arguments;
         QString run_fileName="\-r \"D:/Users/clightcap/Desktop/tedaldi_cal.m\"";
         QString show_wind="-nosplash";
         arguments << run_fileName;
         arguments <<show_wind;

    Suggestions are always welcome.

  • Moderators

    Hi! Please, this is the Qt forum. You can ask questions about Matlab's command line interface on MathWorks' website.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.