no standalone apps output in console
I have function:
function m = magicsquare1(n)
%MAGICSQUARE generates a magic square matrix of the size
% specified by the input parameter n.
% Copyright 2003-2012 The MathWorks, Inc.
if ischar(n)
n=str2num(n);
end
m = magic(n);
>> magicsquare1(5)
ans =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
The standalone application is created by
>> mcc -mv magicsquare1.m
(of course MCR is properly installed and configured)
Then the standalone application "magicsquare1" does not produce any output in command-line console!!! But it should, according to the help page of MATLAB compiler.
When I change the function like this:
function m = magicsquare2(n)
%MAGICSQUARE generates a magic square matrix of the size
% specified by the input parameter n.
% Copyright 2003-2012 The MathWorks, Inc.
if ischar(n)
n=str2num(n);
end
m = magic(n);
disp(m);
and recompile by
>>mcc -mv magicsquare2.m
I am able to get correct output.
>> !magicsquare2 5
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
So my question is: what is wrong? Why I am not able to get output from standalone application magicsquare1?I have function:
function m = magicsquare1(n)
%MAGICSQUARE generates a magic square matrix of the size
% specified by the input parameter n.
% Copyright 2003-2012 The MathWorks, Inc.
if ischar(n)
n=str2num(n);
end
m = magic(n);
>> magicsquare1(5)
ans =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
The standalone application is created by
>> mcc -mv magicsquare1.m
(of course MCR is properly installed and configured)
Then the standalone application "magicsquare1" does not produce any output in command-line console!!! But it should, according to the help page of MATLAB compiler.
When I change the function like this:
function m = magicsquare2(n)
%MAGICSQUARE generates a magic square matrix of the size
% specified by the input parameter n.
% Copyright 2003-2012 The MathWorks, Inc.
if ischar(n)
n=str2num(n);
end
m = magic(n);
disp(m);
and recompile by
>>mcc -mv magicsquare2.m
I am able to get correct output.
>> !magicsquare2 5
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
So my question is: what is wrong? Why I am not able to get output from standalone application magicsquare1? I have function:
function m = magicsquare1(n)
%MAGICSQUARE generates a magic square matrix of the size
% specified by the input parameter n.
% Copyright 2003-2012 The MathWorks, Inc.
if ischar(n)
n=str2num(n);
end
m = magic(n);
>> magicsquare1(5)
ans =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
The standalone application is created by
>> mcc -mv magicsquare1.m
(of course MCR is properly installed and configured)
Then the standalone application "magicsquare1" does not produce any output in command-line console!!! But it should, according to the help page of MATLAB compiler.
When I change the function like this:
function m = magicsquare2(n)
%MAGICSQUARE generates a magic square matrix of the size
% specified by the input parameter n.
% Copyright 2003-2012 The MathWorks, Inc.
if ischar(n)
n=str2num(n);
end
m = magic(n);
disp(m);
and recompile by
>>mcc -mv magicsquare2.m
I am able to get correct output.
>> !magicsquare2 5
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
So my question is: what is wrong? Why I am not able to get output from standalone application magicsquare1? console apps MATLAB Answers — New Questions