Compiled standalone matlab executable fails at math; what am I doing wrong?
이전 댓글 표시
Given file test.m:
function test( a, b )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
a
b
x = a + b;
x
fileID = fopen('test.out', 'w');
fprintf(fileID, 'x=%d', x);
fprintf('%s', 'test.out');
end
compiled with: mcc -m -R nodisplay test.m -d out/
I would expect: out/test.app/Contents/MacOS/test 1 1
To give me 2, both in test.out and on the console. It however returns:
a =
1
b =
1
x =
98
test.out
And test.out contains: x=98
I am flabbergasted... Within matlab everything works as expected. What changes during compile? And how do I fix this
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Clusters and Clouds에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!