Release R2007b is now available. Here's what's new in MATLAB. I plan to highlight some of these features, and perhaps some from related products, in upcoming posts. In addition, there is a significant release of Image Processing Toolbox in R2007b that you might want to check out. I'm sure Steve will be highlighting some of the features on his blog later this year.
Contents
Development Environment
Here are some features that help increase my productivity.
- code folding in the editor - collapses some portions of the file when I don't need to see everything
- M-file run configurations - allows me to set up customized sets of parameters for running a function so I can easily iterate on a problem
- quick access to help from the command line and Editor
Language
Here's a feature that allows me to write more robust code, including managing errors and exceptions correctly.
Mathematics
Of course there's some new math!
- sparse support for more matrix functions
- quadgk - integration over infinite limits
Lots More
There are additional MATLAB features in more areas than I typically cover in this blog. Check out the new release. Then post here and let me know which features you find most interesting and useful.
Get
the MATLAB code
Published with MATLAB® 7.5

Loren,
I’ve started taking a look at 2007b now, and some of it seems nice (like the configurations), but I must say I was very disappointed in the code folding. Why was such a weak form of code folding used? To only be able to fold the help section or subfunctions eliminates 90% of the value of the tool. It is especially disappointing given how easy MatLab terminology makes proper folding (for heaven’s sake, you already show matching with highlights!) Sorry for the rant, but after hearing that it was coming, the reality was a major let down.
Dan
Dan,
Thanks for your feedback and sorry for the disappointment. There will be more folding to come in future releases.
–Loren
Loren,
I’ll second that. Many other development environments allow the user to collapse loops. If there isn’t a feature request in place, I second Dan’s suggestion.
Is the new ability to deal with large arrays (with more than 2×10^31 elements) limited to windows platforms? I ask because even though it is an option to have as many computation threads as cores in OS X, I have yet to see a computation that uses more than one core. I have a hunch that this is since MATLAB is written in java, it is not fully able to take advantage of the OS X API’s that allow for such operation. At any rate, I will be excited to use that feature, probably more than the others.
Andrew
How do Mexceptions and the error/lasterror mechanisms play together? If I call ‘catch ME’, will MATLAB construct an exception if someone has called ‘error’? Will ‘lasterror’ return information from a thrown Mexception?
Andrew-
The large array handling is for 64-bit platforms in general.
–Loren
Tom-
In an ideal world, it’s best to not interleave MExceptions and the older lasterror mechanism. error and MExceptions are 2 ways to throw errors. I think lasterror does return information from a thrown MException, but that might not be the cleanest programming pattern to use.
I will have a separate post on this general topic in the future.
–Loren
Andrew,
Not sure why people think MATLAB is written in java. Yes, the interface is but not the interpreter. I have seen several other posts and websites all saying the same thing.
I forgot where, but Steve Eddins gave a response that said MATLAB and the interpreter is NOT written in java.
This has even come up several times when working with former IT departments. Somehow they were under the impression that the interpreter was in java as well.
Maybe Loren can add further clarification.
Stephen
Stephen-
You are correct that much of MATLAB is not written in Java. Primarily Java is used for the user interface, and occasionally some other tidbits, I think like using the serial port sometimes. The parser, interpreter, etc. — main guts, are in C and C++, linked with libraries that are sometimes Fortran for some of the math, though some of that is via vendor libraries and we might not know what language they are in — but most likely not Java.
–Loren
All,
I stand corrected. However, I still believe that MATLAB doesn’t make calls to the OS X Cocoa (IE not C or C++) API’s that tell the OS which operations can be parallelized (a major downside of using the OS, perhaps). I’d be interested to know if the problem exhibits itself on a true UNIX system.
Andrew
Andrew-
You should try running the demo named multithreadedcomputations on a multiprocessor OS X machine. Not all operations in MATLAB take advantage of multiprocessors, but some definitely should for you and that demo should show you at least some of them. Also, you should run make sure your testing is from an M-file and not from the command-line which doesn’t have the benefit of the JIT.
For R2007a on the PowerPC, the number of threads only impacts the element-wise operations because the BLAS are already always multithreaded. Intel MAC, the preference panel controls both the BLAS and element-wise operations (in M-files).
–Loren
i think it’d be awesome if Matlab were to keep its BLAS and LAPACK libraries up to date with every biannual release. just to feel like we’re getting our money’s worth out of these computers…
the new mmreader’s capability to read files other than .avi looks good. ideally though, there would be a complementary mmwriter. why wasn’t there an mmwriter object shipped with 2007b, considering that for winxp 64, you can’t compress .avi files?
also, the photoshop/matlab x64 integration could use some work, but i suppose i should complain on an adobe blog about that =)
I like the new ROI functions (especially impoly and imfreehand). These will be very useful. I still would like to know why the Image Acquisition toolbox only supports 32-bit Windows, and when, if ever, it will be compatible with OS X, Linux, 64-bit OS’s, etc. I would assume at some point it will have to be upgraded to support Vista, right? What’s holding it back?
Evan,
The Image Acquisition Toolbox does not support non-Windows operating systems because most of the hardware that the toolbox supports does not have drivers on those systems. We are monitoring the situation and the number of requests that we get for such support. The Image Acquisition Toolbox does support Vista, but most of the supported hardware does not have Vista compatible drivers.
Unfortunately I have some problems with R2007b I didn’t experience with R2007a, R2006b or R2006a. The following problems occured:
1. I tried to run MCRInstaller.exe on a machine with Windows XP and a dual core processor, but the program didn’t work on this machine. On other machines (where Matlab is installed) it did work.
2. When I try to run the profiler on my laptop (which has a dual core processor, 1 GB RAM and Windows XP), Matlab hangs up. I have trouble terminating Matlab even from task manager, leave alone closing the application I am trying to test.
I can’t renounce on multithreading so I must profile my application on my laptop. The compiled program must be able to run on the machine MCRInstaller didn’t work on.
I downloaded R2007b from www.mathworks.com and today I received R2007b on DVD. Are the problems I am experiencing caused by dual core processors and multithreading or is it caused by downloading?
Someone please help me.
You should contact technical support for help with your issues: http://www.mathworks.com/support/contact_us/index.html
–Loren
I have contacted technical support and I have received an answer. During debugging and profiling I observed the following:
R2007b, function fastinsert, line 104
e = fetch(e, 0);
takes 82 % of calculation time of fastinsert
R2007a, function fastinsert, line 104
e = fetch(e, 1);
takes 34 % of calculation time of fastinsert.
Obviously the change
from
e = fetch(e, 1);
to
e = fetch(e, 0);
does not improve fastinsert. I’ve sent an e-mail to support this morning.
Thank you for drawing our attention to multithreadedcomputations. We can see all 8 cores working on matrix multiplication, z=x*x; We are using R2007a. Good.
However, we need to speed up multiplying a matrix by a vector,
x=rand(1000,1000); y=rand(1000,1); z=x*y;
This always runs on one core when one imagines that it would be possible to run it on all 8 by slicing x horizontally into 8 smaller matrices, e.g.
x1=x(1:125,:), z1=x1*y, etc.
Please can you suggest what we should do?
Darcy,
Matrix multiplication is supported with multithreading, but the specific behavior you see depends on what BLAS are running behind the scenes. I suggest you contact technical support to work with you on this.
–Loren
hi
i have created a gui with an axes called offline. in this axes i load an image called IMG. if i want to use the impoly, imfreehand, imellipse or imrect it doesn’t work:
axes(handles.Offline)
imshow(IMG);
s = imrect(gca,[]);
give no result.
but with
axes(handles.Offline)
figure, imshow(IMG);
s = imrect(gca,[]);
i can do it. without figure it works only if i give the points:
…
s = imrect(gca,[10 10 100 100])
what can i do?
regards torsten
Torsten-
This is really not the right venue for your question. Please contact technical support.
–Loren