Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  1. -nodesktop - Do not start the MATLAB desktop. Use the current
  2. terminal for commands. The Java virtual machine
  3. will be started.
  4.  
  5. #include <QtGui/QApplication>
  6. #include <iostream>
  7. using namespace std;
  8. #include <cmath>
  9.  
  10. #include <QProcess>
  11. #include "planevolume.h"
  12. #include "dialog.h"
  13.  
  14. int main(int argc, char *argv[])
  15. {
  16. // Start MATLAB MAIN.m
  17. QProcess* p = new QProcess(NULL);
  18. p->start( QString( "/usr/local/MATLAB/R2011b/bin/matlab"),
  19. QStringList() << QString("-r /home/matt/Desktop/PlaneVolumeExec/MAIN.m")
  20. << QString("-nosplash")
  21. << QString("-nodesktop"));
  22.  
  23. QApplication app(argc, argv);
  24.  
  25. Dialog *dialog= new Dialog;
  26.  
  27. if (dialog->exec())
  28. {
  29. planevolume mainwindow(dialog->getdirprefix(),dialog->getxpax(), dialog->getypax(), dialog->getzpax(), dialog->getxmmax(), dialog->getymmax(), dialog->getzmmax(), dialog->getintzminp(), dialog->getintzmaxp(), dialog->getintzminm(), dialog->getintzmaxm());
  30. mainwindow.show();
  31. return app.exec();
  32. }
  33.  
  34. return 0;
  35. }
  36.  
  37. /*-h|-help - Display arguments.
  38. -n - Display final environment variables,
  39. arguments, and other diagnostic
  40. information. MATLAB is not run.
  41. -e - Display ALL the environment variables and
  42. their values to standard output. MATLAB
  43. is not run. If the exit status is not
  44. 0 on return then the variables and values
  45. may not be correct.
  46. -arch - Start MATLAB assuming architecture arch.
  47. v=variant - Start the version of MATLAB found
  48. in bin/glnxa64/variant instead of bin/glnxa64.
  49. v=arch/variant - Start the version of MATLAB found
  50. in bin/arch/variant instead of bin/glnxa64.
  51. -c licensefile - Set location of the license file that MATLAB
  52. should use. It can have the form port@host or
  53. be a colon separated list of license files.
  54. The LM_LICENSE_FILE and MLM_LICENSE_FILE
  55. environment variables will be ignored.
  56. -display Xdisplay - Send X commands to X server display, Xdisplay.
  57. -nodisplay - Do not display any X commands. The MATLAB
  58. desktop will not be started. However, unless
  59. -nojvm is also provided the Java virtual machine
  60. will be started.
  61. -nosplash - Do not display the splash screen during startup.
  62. -mwvisual visualid - The default X visual to use for figure windows.
  63. -debug - Provide debugging information especially for X
  64. based problems.
  65. -desktop - Allow the MATLAB desktop to be started by a
  66. process without a controlling terminal. This is
  67. usually a required command line argument when
  68. attempting to start MATLAB from a window manager
  69. menu or desktop icon.
  70. -nodesktop - Do not start the MATLAB desktop. Use the current
  71. terminal for commands. The Java virtual machine
  72. will be started.
  73. -nojvm - Shut off all Java support by not starting the
  74. Java virtual machine. In particular the MATLAB
  75. desktop will not be started.
  76. -jdb [port] - Enable remote Java debugging on port (default 4444)
  77. -r MATLAB_command - Start MATLAB and execute the MATLAB_command.
  78. -logfile log - Make a copy of any output to the command window
  79. in file log. This includes all crash reports.
  80. -Ddebugger [options] - Start debugger to debug MATLAB.*/
  81.  
  82. QProcess* p = new QProcess( this );
  83. p->start( "%MATHLAB_EXE_FILE_FULL_PATH%", "%FILE_M_FULL_PATH%" );
  84.  
  85. p->start( QString( "C:/Program Files/MatLab 9.0/matlab.exe" ),
  86. QStringList() << QString( "-r D:/My files/matlab/file.m" )
  87. << QString( "-nosplash" ) );
  88.  
  89. QProcess::execute("My_programm.bin -arg1 val1 -arg2 val2");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement