Question
I want it to \'listen\' to the standard input stream in a running (compiled) Matlab executable.
This is how I believe it is done in
It turns out that input reads the standard input stream.
The reason why I failed to collect my inputs, is because I was using it as follows:
input('prompt','s')
As a result the string 'prompt' was sent to the program calling my application, and as it considered this an invalid response/request it did not send anything.
I have succeeded in making a small test program, and unlike I suspected before it is NOT a problem that the other application doesn't hit enter after sending a command.
The general solution
This is the way I have my current setup,
while 1
stdin = input('','s'); % Note the empty first argument
if ~isempty(stdin)
stdout = process_input(stdin);
stdout % Displaying the result (And thus sending it to stdout)
end
end