How to embed a command prompt into an mlapp?

조회 수: 4 (최근 30일)
Dominik Mattioli
Dominik Mattioli 2020년 10월 4일
댓글: Walter Roberson 2020년 10월 5일
I'd like to embed a command prompt into an mlapp. Basically, recreate the Command Window within my own custom mlapp. I would like the usr to receive instructions and notifications within this console, and I am also using a tcp connection to run a python script so it would be nice to not have a separate windows popping up for all of these interactions.
Would this require some significant MATLAB-java backend programming? Or is there a built-in functionality with the 2020b AppDesigner?
  댓글 수: 5
Mario Malic
Mario Malic 2020년 10월 5일
편집: Mario Malic 2020년 10월 5일
I would be also interested in this. As an alternative to see the outputs from the command window, I use diary and fread in combination with Text area with turned off ability to edit.
If you run MATLAB through actxserver, new instance opens, with only a command line,
Matlab_COM = actxserver('Matlab.Application')
It would be great if it would be possible to attach it to current running instance of MATLAB, but I wouldn't know if it can be done, or if it's possible.
Matlab_COM.Execute("a = 'this is cool'");
% In this separate instance
» a
a =
'this is cool'
Walter Roberson
Walter Roberson 2020년 10월 5일
Compiled would be a problem. Compiled does not have access to evaluating user input as commands.
Compiled does not stop you from defining a command language and parsing it and having a data structure that you use to chain together pieces. On the other hand, the more flexible you make that command language, the more you would have to worry about being in violation of the license agreement.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to C++ Applications Using mwArray API (C++03)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by