Saving file issue while trying to add variables

3 ビュー (過去 30 日間)
Luis Lopez
Luis Lopez 2019 年 1 月 14 日
コメント済み: Luis Lopez 2019 年 1 月 14 日
Hi,
I was trying to add some variables to an existing .mat file, however the new variables were not added when I run all the script, but if I choose Run and Advance the variables are saved ok, even if I run the single line in the Command window that seems to be causing the issue everything is ok. Hope you can give me your advise.
filename = 'FJC_ISBe5_FJC_FC2772_Inactive_Fault';
mysave = [d,'\' ,filename];%%Save in this directory with this name
save(mysave,'-struct','p');%%Save from p variable
%%
% tic;pause(10);toc;%% I add this pause thinking this could solve but didn't work
save(filename,'Active_Faults','Inactive_Faults','-append');%Add variables to existing file

採用された回答

Stephen23
Stephen23 2019 年 1 月 14 日
You are saving to different files:
save(mysave,...)
save(filename,...)
  1 件のコメント
Luis Lopez
Luis Lopez 2019 年 1 月 14 日
Thanks!, I didn't realize that!

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by