views:

53

answers:

2

I have a MATLAB assignment due in an hour, and I wrote it all in MATLAB 7. One of my friends who took the assignment said that it is not working on MATLAB 6.1 as functions like dirac are not defined. I only just found out that the MATLAB version used for evaluation is 6.1, and I have no idea how to fix my code. Can anyone help by pointing me towards changes between the two versions. I am already looking at http://www.mathworks.com/access/helpdesk/help/techdoc/rn/f8-1009921.html and trying to figure out what I need to change. I really only have an hour left and any advice will really help.

A: 

Well, my deadline expired and I had to submit as was. In case it helps anyone though, the following is what I did:

  • Instead of using figure(), use figure.
  • The dirac function will not work in matlab 6

Except for the above two though, the code worked pretty much the same between the two versions. I ended up getting 14/15.

Nikwin
A: 

Since Matlab's revision history is poorly documented, the only way to really be sure is to run and debug the code on the old version of Matlab.

When I say 'poorly documented', I mean that part of the changes are shown in the not-easily-searchable release notes under 'compatibility considerations' or 'new features, or 'fixed bugs', and part of the changes are not documented at all (where does it say that diag.m no longer works on cell arrays since r2009b, for example?).

Jonas
That is one of the main reasons why it sometimes doesn't get chosen as the language for the project in the scientific communities.
ldigas
Really? This is the first time I hear this argument. In my scientific community, people worry about Matlab's price tag, if anything, and not whether the version history is nice. But then, people are used to working with Excel.
Jonas
No, this is not a valid reason to not choose matlab. All languages will have problems with portability between significantly different versions. Going backwards is always a difficult thing with any language that is showing constant development over time. In fact, assuring backward compatibility is harder than assuring forward capability, as any new feature at all will be seen as not compatible. Finally, languages that never add functionality and new features are more likely known as "dead" languages.
woodchips

related questions