Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Stdin and Stdout in Matlab standalone Applications
Date: Thu, 25 Apr 2013 14:18:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <klbdv1$ael$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-06-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1366899489 10709 172.30.248.38 (25 Apr 2013 14:18:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 25 Apr 2013 14:18:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1695008
Xref: news.mathworks.com comp.soft-sys.matlab:794338

In the page 27 of section 6 of the Matlab Compiler documentation (http://www.mathworks.com/help/pdf_doc/compiler/compiler.pdf) states the following:
<<
You cannot return back values from your standalone application to the user.
The only way to return values from compiled code is to either display it on
the screen or store it in a file. To display your data on the screen, you either
need to unsuppress (do not use semicolons) the commands whose results
yield data you want to return to the screen or, use the disp command to
display the value. You can then redirect these outputs to other applications
using output redirection (> operator) or pipes (only on UNIX systems).
>>

It is not clear to me if using disp() and the output redirection ">" I could actually communicate (only on one direction) with other software.

This is the scenario where I want to use a Matlab Standalone Application:
-From inside a software written in Qt, I would like launch a Matlab Standalone Application executable, passing an input argument to it. In general, this shouldn't be a problem. At least, I can launch external applications from my Qt software by just calling them with typical command line syntax:
myExternalapp.exe myParam
-Once opened, the Matlab Standalone Application would take the input argument, which is a csv file, convert it to a matrix, and make a plot with it.
-My doubt comes here: when I click in a certain point of my plot in the Matlab Standalone Application, I can visualize which x,y,z values correspond to that point. And what I want to do is: when I click on a point of the plot, send back the "x" value (for example) to my Qt application. Usually, with other external applications, what I do is send that values through the stdout, and take that stdout into the stdin of my Qt application. But in this case, since stdout is not available in the Matlab Standalone Application, I wonder what would be a possible workaround to make that happen. Maybe using disp() and redirect the output with ">" to the Qt application, but I'm not even sure how to mount that up.

Maybe the more experimented users can help me out here.

Thank you,
Raul