Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qprocess and Matlab
Qt 6.11 is out! See what's new in the release blog

Qprocess and Matlab

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 955 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anfedres
    wrote on last edited by
    #1

    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;
         qDebug()<<arguments<<endl;
         p->start(program,arguments);
    

    Suggestions are always welcome.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

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

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved