From: Mark Shore on 26 Feb 2010 10:36 "Øyvind " <oyvist(a)gmail.com> wrote in message <hm8lnm$j2o$1(a)fred.mathworks.com>... > > That's interesting. Is there any new syntax, or completely new features in the basic language itself? I mean, does the 'What's new..' section in the documentation have anything 'big'? > > Oh, and is this version 7.10, or 8.0? > > -- Øyvind It's v 7.10. I've been too busy to get into the details of the prerelease, and as already noted it's subject to an NDA, but it looks like nothing 'big' or groundbreaking but rather an incremental update with bug fixes, some new features and extensions to multithreaded functions, and deprecation of certain old functions and toolbox GUIs.
From: Walter Roberson on 26 Feb 2010 11:53 Ãyvind wrote: > So is noone interested in the new release, or is it that one has to sign > a non-disclosure agreement before downloading it? I mean, not a single > soul is even willing to _speculate_ what's coming? The syntax of 'for' has been enhanced so that if it is followed by a sequence of non-blank characters that includes the * or ? characters, or by a quoted sequence of characters that includes the * or ? characters (and may include blank), then the sequence of characters is treated as a filename pattern that is to be globbed and the loop iterated over each resulting file name. For example, for fid = 'C:\Documents and Settings\Roberson\Matlab 2010a\datadir\*.wav' would expand the pattern and assign each name in turn to fid. The functionality of save has been enhanced such that if the first string passed to save has the format of a valid variable name, and that variable name exists in the routine that called save, then instead of the string being used literally, the value of the variable will be retrieved and used as the filename. This enhancement will support the often-requested sequence, e.g., filename = 'Eig_results.mat'; save filename X There will be a new optional parameter to cell(), zeros(), ones(), char(), single(), double(), logical(), the int*() and uint*() and typecast routines and various other routines such as diag(); the optional parameter will be named 'index0', and it will cause the resulting array to be indexed starting from 0 rather than from 1. In the rare situation where the number of indices provided is exactly enough that logical indexing might be inferred, logical indexing of such arrays will only be used if the provided indices are of type logical (or a subclass of logical); for arrays without the index0 attribute, logical indexing will continue to be performed if all of the indices have _value_ 0 or 1, no matter what type. There will be a new set of parameters to system_dependent with names beginning with 'dwim' (Do What I Mean). As per usual, the effects of these parameters will be undocumented.
From: Siyi Deng on 26 Feb 2010 16:09 the save filename X and index0 thing is horrible. Breaks old code and the consistency of Matlab language. I hope it is and will never be true. > retrieved and used as the filename. This enhancement will support the > often-requested sequence, e.g., > > filename = 'Eig_results.mat'; > > save filename X > > There will be a new optional parameter to cell(), zeros(), ones(), > char(), single(), double(), logical(), the int*() and uint*() and > typecast routines and various other routines such as diag(); the > optional parameter will be named 'index0', and it will cause the > resulting array to be indexed starting from 0 rather than from 1. In the > rare situation where the number of indices provided is exactly enough > that logical indexing might be inferred, logical indexing of such arrays > will only be used if the provided indices are of type logical (or a > subclass of logical); for arrays without the index0 attribute, logical > indexing will continue to be performed if all of the indices have > _value_ 0 or 1, no matter what type. >
From: Walter Roberson on 26 Feb 2010 17:33 Siyi Deng wrote: > the save filename X and index0 thing is horrible. Breaks old code and > the consistency of Matlab language. I hope it is and will never be true. > > > > retrieved and used as the filename. This enhancement will support the >> often-requested sequence, e.g., >> >> filename = 'Eig_results.mat'; >> >> save filename X Apparently, Mathworks analyzed a fair number of programs to determine what the impact of the change to save() would be, and found that the only programs that would break were some of the submissions to the programming contests. On the other hand, Mathworks apparently found that 17.3% of the analyzed programs started _working_ properly with the change (though most of the program authors apparently hadn't noticed the fault in their code.) According to a leaked tweet, Mathworks figures that this single change will reduce the volume of cases to their support centre by 6.2% ... though a distressingly high number of users are expected to still put through cases based upon not knowing that they have to put quotes around filenames in assignments, sigh.
From: Jan Simon on 27 Feb 2010 08:29
Dear Walter! > >> filename = 'Eig_results.mat'; > >> save filename X > > Apparently, Mathworks analyzed a fair number of programs to determine what the > impact of the change to save() would be, and found that the only programs that > would break were some of the submissions to the programming contests. > On the other hand, Mathworks apparently found that 17.3% of the analyzed programs > started _working_ properly with the change (though most of the program authors > apparently hadn't noticed the fault in their code.) According to a leaked > tweet, Mathworks figures that this single change will reduce the volume of > cases to their support centre by 6.2% ... though a distressingly high number > of users are expected to still put through cases based upon not knowing that > they have to put quotes around filenames in assignments, sigh. This analysis might be strongly biased by the selection of the programs! If TMW looks in the pool of programs, which have been sent to the support, they are naturally faced mainly with buggy programs. If a programmer works seriously and reads the documentation of SAVE before using it, there will be no misusing and with a higher probability there will be no need to send the source to TMW! If 17.3% and 6.2% are in any way meaningful numbers, it would be a good idea to modify the == operator, such that FIND(0:0.1:1 == 3) replies 4 as expected by nearly 90% of the Matlab newbies !?! In my opinion changing SAVE in the mentioned way fixes 1000 trivial bugs, but causes 5 bugs, which are really hard to find even and especially for professional programmers who are working with Matlab for many years. It would be more consistent to replace the corresponding sentence in the documentation of SAVE: "save(savefile, 'v1') % Use when filename is stored in a variable" ==> "savefile = fullfile(tempdir, 'TestFile.mat'); save(savefile, 'v1') % Use when filename is stored in the variable savefile Common pitfall: save filename X This saves X to the file called 'filename.mat' " Index0 for zero based indices?? A really assume a joke. This would cause really serious changes in the Mex interface. How could a Mex script like a handmade FIND determine which index to return? Do I understand correctly, that this would invalidate a lot of Mex functions published in the FEX? I hope, that I miss the point, that this is just your speculation and your are in a funny mood today. > for fid = 'C:\Documents and Settings\Roberson\Matlab 2010a\datadir\*.wav' > would expand the pattern and assign each name in turn to fid. Really??? Then this would change its behaviour dramatically and the result would depend on the current directory: for k = 'abcd*'; disp(k); end I remember this thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/267352 which points to some serious bugs in fundamental functions. I deeply hope, that 2010A fixes more bugs than it adds. Adding new ambiguous functionalities like zero-based indices, magic SAVE and "intelligent" FOR would absolutely not help to increase the quality of Matlab and the programs written in this language. Kind regards, Jan |