Content of std.m file
2 ビュー (過去 30 日間)
古いコメントを表示
hi all,
I have datafun toolbox. However, by mistake i changed the code in std.m file(standard deviation). That would be good if anyone can tell me the content inside std.m file. thanks
回答 (1 件)
John D'Errico
2015 年 8 月 5 日
編集済み: John D'Errico
2015 年 8 月 5 日
And this is why I NEVER tell anyone to edit TMW provided code. Too many novices will edit the code and blow away provided code.
Editing provided code to look at it is a BAD IDEA. If you think you want to edit the code for std, think again. Then think about it a third time if necessary. There is no need to edit std.
Instead, use the type command if you just wish to look at the code.
To recover a toolbox function, just download that toolbox again from the website. You need not download all of MATLAB.
6 件のコメント
dpb
2015 年 8 月 5 日
I've always wondered why TMW didn't set the "read-only" bit but (at least on Windows) I don't think it ever has on installation. I surely don't recall ever having had it occur (and yes, while not a recommended practice, I have made bug fixes and enhancements on the distributed m-files since from the first installation I ever had() altho I am _*exceedingly_ careful to make backups of the originals prior to doing so and have never destroyed an original in the 25+ years).
I just checked and going back to R11, the earliest still-installed version here, and there are no m-files in the distribution that are write protected.
(*) I've also a text file that keeps track of which functions and what's been modified and a test suite or case to check whether the issue has been resolved in new releases on a new installation. Most all that were actual bugs have been; some of the enhancements may have done; some of those I've continued to carry along while others haven't bothered as the driving force behind them at the time often has gone away with the project at hand when it was an issue...the latter comes with retirement from active consulting, mostly. :)
David Young
2015 年 8 月 6 日
The nice thing about the POPLOG editor, VED, was that you could give the command pved file.p (instead of the usual ved file.p) and it would start in a protected mode that prevented writing. You could therefore use it for any of your own code that you just wanted to inspect, as well as for POPLOG system files. Actually the system files were all write protected on installation as well, but using protected mode in the editor was tidier than falling back on file system protection. You could switch protected mode on and off from the editor as well.
参考
カテゴリ
Help Center および File Exchange で Install Products についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!