Problem with saving a Matlab file
5 ビュー (過去 30 日間)
古いコメントを表示
Hi Guys,
My code shoud generate a mat lab file in which I have all the variables. Unfortunatly, I am not able to generate it correclty: Instead of having a .mat file I have a blank file without "termination" (not .mat). Can you help me to understand the problem?
basename=1ug
save([basename '_BTads']) . This is the line I use to save it
thanks
0 件のコメント
回答 (1 件)
Star Strider
2022 年 2 月 10 日
Always supply the .mat extension yourself. MATLAB has no way of knowing otherwise, and assumes that what you assume is a file name is a variable that MATLAB can’t find.
See if:
save([basename '_BTads.mat'])
will do what you want. (This will save every variable in the current workspace, not selected variables, so specify them if you only wnat to save some of them.)
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Debugging and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!