I've read the release notes of Matlab 2012a and found this: ReleaseNotes: Change of set functions. This does not concern 2012a! Then the output of unique etc. will contain the index of the first occurence and the indices are column instead of row vectors.
Does this change affect your work? Will it be a benefit for you? How many lines of code do you have to check to see, if you old programs will be compatible with this midification of standard functions?
No products are associated with this question.
The good news is that you have quite some time - several releases - in which to evaluate the impact of this change on your large code base. It need not be as complicated as you outline above.
1. Simply add a trailing 'R2012a' flag to all occurrences of the set functions in you code and run your test suite. 2. Any tests that fail - go back and change the 'R2012a' flag to 'legacy'. Re-run and those tests should now pass.
We understand large MATLAB codes exercising some of our oldest and most powerful features exist, and make it difficult to change those functions, even if the change is really a bug fix. Our hope is that by offering this phased approach to evaluate and buy into the new behavior will give customers a comfortable window in which to adopt it.
Please be in touch if you have other comments. They are always welcome!
Penny Anderson MathWorks, Inc.
The new features of the set functions are powerful and useful. I can add a 'last' flag to all of the unique commands in my code, if the old ordering scheme is required. And I can reshape the output manually to have the former row shape.
The only problem I have is, that I'm supporting a Matlab program with some hundred thousands code lines and I have to check more than 1500 occurences of these commands in my code. Either I analyse the surrounding code to see, if it adjustments are required, or I add the 'last' flag and an extra-line for the reshaping in general. Both solutions consume a remarkable amount of time, and both will set the status of the source code to not tested.
Therefore this change will mean for me:
I see a general conflict between using or publishing large Matlab programs and upgrading the Matlab release. Distributing compiled programs is not an option, because the software is used for scientific projects and the ability to see and modify the source is important. The avoidance of the updating is not a sufficient option also, because existing bugs are usually fixed in newer releases only - e.g. the problems of audioplayer in 2011b are solved by installing 2012a.
The common appearence of 1. changes in the basic functions and 2. the bugfix by upgrade strategy is a very strong drawback, when large Matlab programs are used in scientific projects. What a pitty.
Play games and win prizes!Learn more