Having Fun Yet?
13 次查看(过去 30 天)
显示 更早的评论
Reverse compatibility for MATLAB is not very impressive.
>> fwave1
Warning: PACK can only be used from the MATLAB command line.
> In fwave1 (line 335)
Oh getting all these 20-30 year old programs to work with this "new and improved" version is going to be time consuming. Good thing I'm retired, and still have AT-MATLAB with gpp on a DOS machine. Hey, it'll keep me out of trouble. Probably should wait till I have a campfire and a beer. :-)
采纳的回答
Walter Roberson
2017-2-28
When I check the MATLAB 5.0 (release 10) documentation it says that pack works by saving the workspace to a file, clearing all functions and variables from memory, and loading the file.
If it were executed from a function or script then it would clear the function or script from memory, destroying what it was executing. Especially if it was a function, since it is not the current workspace that is saved, just the base workspace.
So you have code that blows itself out of the water and you are upset that current versions have no
feature('allowcodetocorruptitself', true)
... Or do I need to try find even older release documentation?
更多回答(1 个)
Jan
2017-2-28
A campfire and a beer is a valuable solution.
pack was an evil hammer to start a garbage collection and defragment the memory. On modern machines install enough RAM and omit all calls to pack.
I suffer from the the limited backward compatibility of Matlab also, but compared to other programming environments, Matlab is the most stable system I know. Especially pack is a bad example, because it was a really good idea to limit its power.
3 个评论
Jan
2017-2-28
I'm still frustrated when I see how damn fast Matlab 5.3 or 6.5 starts in a virtual machine. While I wait endless seconds until the first figure is drawn by R2016b, they appear almost immediately in the ancient versions. Some weeks ago I ran some tests with compiled C-mex files and was 20% faster under R2009a.
Nevertheless, while Matlab 6.5 saves me seconds of runtime, the MLint code checker saves me hours for debugging. I will not miss uipanel's and uitree's anymore, nor the MExceptions in TRY/CATCH. I hate the auto-completion, but it is marvelous to rename all occurrences of a variable automatically.
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!