Save and Load the variables in GUI Mode

Hello
I nee to save a structure LD in a file. The user types the filename using uiputfile
[file,path] = uiputfile('*.m','Save file name');
if file~=0
save(fullfile(path,file), LD)
end
error:
??? Error using ==> save Argument must contain a string.
Can some one help me pls.

 採用された回答

Walter Roberson
Walter Roberson 2012 年 7 月 22 日

0 投票

save(fullfile(path,file), 'LD') %note quotes

3 件のコメント

Thulasi Durai Durai Samy
Thulasi Durai Durai Samy 2012 年 7 月 22 日
Hello Walter Roberson
I tried this codes, their is no error, at the same time the data's is not saved. but it works great with
save 'C:\Users\Admin\Dropbox\Laminate Ver2\abc.m' LD
can you suggest some idea the user need to type the file name
Thulasi Durai Durai Samy
Thulasi Durai Durai Samy 2012 年 7 月 22 日
Hello Walter Roberson
ya! the error I made is
uiputfile('*.m','Save file name');
should have extension *.mat,
thanks for advice!
Thulasi Durai Durai Samy
Thulasi Durai Durai Samy 2012 年 7 月 22 日
Hello Walter Roberson
If I save handle of an objects does this reference to the objects handle remain same if I reload the handle

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

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by