How I can save the command that I wrote it in command window?

2 ビュー (過去 30 日間)
Ameligege
Ameligege 2015 年 2 月 9 日
コメント済み: Ameligege 2015 年 2 月 9 日
How I can save the command that I wrote it in command window? If I saved these command by save the work space and I could not open these command because I saved it as .mat? how I can retrieve my work.

採用された回答

dpb
dpb 2015 年 2 月 9 日
編集済み: dpb 2015 年 2 月 9 日
Save saves the values of variables, not the commands by which you created them.
Easiest way to save a sequence of your work if you were working at the command line is probably--
commandhistory % open the command history window
Then highlight the section you wish that you've done and right click...that'll open a menu one item of which is "Create Script". Select that and the highlighted section will be pasted into a new editor script window which you can then rename and modify at will..
Alternatively, simply highlight the area in the command window, and copy it to clipboard via ^C and type
edit aScriptName.m
and then ^V to paste into the window...same end result. aScriptName.m is, of course, a placeholder for whatever filename you wish to give your script, not to be taken as literal.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by