Having Fun Yet?

13 次查看(过去 30 天)
Chris Conant
Chris Conant 2017-2-28
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. :-)
  6 个评论
Chris Conant
Chris Conant 2017-2-28
Thanks John. We change too, don't we? So far my old code is working surprisingly well. Besides, if I was thinking straight - I would've seen the pack message was just an warning, not a crash. Duh. Good thing we don't have to think for a living anymore, isn't it? :-)
Chris Conant
Chris Conant 2017-2-28
Steven, does Cleve still use Fortran IV for the source code?
I've been to his place (1991 & 1993), it's his turn to come to mine. You now what I mean..... :-)
I don't think I'll post a screen shot of an IBM Model 30-286 I resurrected a few weeks ago. The world does change - it's a tad bit more politically correct. Someone might get offended. :-)

请先登录,再进行评论。

采纳的回答

Walter Roberson
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 个评论
Chris Conant
Chris Conant 2017-2-28
Naa, not upset. Just running old versions for the first time in (obviously) quite a while. Don't have documentation for Version 5. Last book I have is 386 MATLAB. :-)

请先登录,再进行评论。

更多回答(1 个)

Jan
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
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.
Chris Conant
Chris Conant 2017-2-28
Agreed. Search and replace is nice. However, auto-screw me up really isn't that fun. :-)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Scripts 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by