I think this:
matlab -nojvm -nosplash -r MyCommand
matlab -nojvm -nosplash -r MyCommand
To copy to clipboard, switch view to plain text mode
should look:
arguments << "-nojvm" << "-nosplash" << "-nodisplay" << "-r" << "addmatrix";
exec->start("matlab", arguments);
arguments << "-nojvm" << "-nosplash" << "-nodisplay" << "-r" << "addmatrix";
exec->start("matlab", arguments);
To copy to clipboard, switch view to plain text mode
I manually launch shell and manually the start matlab in bash mode.
after start my Qt program and redirect the standartd input on the standard input of the shell as if the program wrote in shell to the place mine....CAN I DO THIS ???
As I understand, you want to pass the input from you Qt app to the matlab?
I would try starting matlab with a QProcess, and then writing and reading it's input/output, like sample code in assistant:
if (!gzip.waitForStarted())
return false;
gzip.write("Qt rocks!");
gzip.closeWriteChannel();
if (!gzip.waitForFinished())
return false;
QProcess gzip;
gzip.start("gzip", QStringList() << "-c");
if (!gzip.waitForStarted())
return false;
gzip.write("Qt rocks!");
gzip.closeWriteChannel();
if (!gzip.waitForFinished())
return false;
QByteArray result = gzip.readAll();
To copy to clipboard, switch view to plain text mode
Bookmarks