필터 지우기
필터 지우기

Error in Overiding Data in compiled MAT file in Standalone Application

조회 수: 2 (최근 30일)
I have a set of values which i have saved in MAT file and along with several m-files compiled and created a stand alone application. In the stand alone application, I have opened the MAT file data and edited some values and saved data again into same MAT file to override the data. But instead of overriding the MAT file it is creating a new MAT file in the same directory of exe file (outside world), but what i want is to override the same MAT file which i have used during compilation.
x = load('Values.mat');
x1 = x.x1;
x2 = x.x2;
save 'Values.mat' x1 x2;
used to override the data
What i need to do, in order to override the data into the same MAT file which loaded during compilation..?

채택된 답변

Kanchibhotla Chandra Sekhar
Kanchibhotla Chandra Sekhar 2014년 1월 21일
I have used the following code -
save 'Values.mat' 'x1' 'x2' '-append';
which working perfectly fine....

추가 답변 (1개)

Suneesh
Suneesh 2014년 1월 20일
The init callback is part of MATLAB execution and does not get included during code generation. You may be able to achieve what you are trying by using the Rapid SIMulation target (rsim.tlc). See:
  댓글 수: 1
Kanchibhotla Chandra Sekhar
Kanchibhotla Chandra Sekhar 2014년 1월 21일
I didn't know why rtw document applies my program about compiled standalone application...but i have read the document and change the attributes of my MAT file into write mode before saving it again so as to override the data. But still i am facing the same problem.

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

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by