How to update compiled .mat file in standalone?

2 ビュー (過去 30 日間)
sejo
sejo 2014 年 11 月 12 日
コメント済み: sejo 2014 年 11 月 12 日
Hi, i have a gui standalone where i load and save data from/to a .mat file. Loading does work with fallowing code...
load(defaultValues.mat)
but saving it with
save(defaultValues.mat)
creats a new .mat file and does not update the original. How can i save to the original .mat file?
There are already some QUESTIONS about this topic put this answer does not work for me...

採用された回答

Adam
Adam 2014 年 11 月 12 日
Use the full path when saving. Otherwise it will dump it in some odd location related to the install directory.
  4 件のコメント
Adam
Adam 2014 年 11 月 12 日
編集済み: Adam 2014 年 11 月 12 日
I have set up an environment variable that my compiled applications use and ask the user to give a "Matlab working directory" for which is then used by all my compiled applications that user may install, but Titus' solution is simpler for just updating a given file.
sejo
sejo 2014 年 11 月 12 日
Thx for your help! i will go with the 'simpler solution' as it works fine for me for the default values. for the other values which can be saved i use uigetfile and uiputfile...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by