Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Loren on the Art of MATLAB

September 5th, 2007

R2007b is Live

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

20 Responses to “R2007b is Live”

  1. Dan Kominsky replied on :

    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

  2. Loren replied on :

    Dan,

    Thanks for your feedback and sorry for the disappointment. There will be more folding to come in future releases.

    –Loren

  3. Andrew Catellier replied on :

    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

  4. Tom Richardson replied on :

    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?

  5. Loren replied on :

    Andrew-

    The large array handling is for 64-bit platforms in general.

    –Loren

  6. Loren replied on :

    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

  7. StephenLL replied on :

    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

  8. Loren replied on :

    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

  9. Andrew Catellier replied on :

    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

  10. Loren replied on :

    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

  11. noel replied on :

    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 =)

  12. Evan replied on :

    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?

  13. Dave Tarkowski replied on :

    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.

  14. OkinawaDolphin replied on :

    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.

  15. Loren replied on :

    You should contact technical support for help with your issues: http://www.mathworks.com/support/contact_us/index.html

    –Loren

  16. OkinawaDolphin replied on :

    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.

  17. darcythompson replied on :

    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?

  18. Loren replied on :

    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

  19. Torsten replied on :

    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

  20. Loren replied on :

    Torsten-

    This is really not the right venue for your question. Please contact technical support.

    –Loren

Leave a Reply


Loren Shure works on design of the MATLAB language at The MathWorks. She writes here about once a week on MATLAB programming and related topics.

  • Ulla Vainio: That error bar width adjustment was extremely useful and I would never have figured it out myself....
  • Peter Perkins: Jessee, there is a property that you can use to tag variables with units. For example, >> load...
  • Jessee: I could potentially see myself using dataset for casually looking at data, but from an application standpoint...
  • Loren: Oktay- It very much depends on the details of the calculations you are doing. Vectorization can sometimes...
  • Oktay: Hello, Is there any significant difference between using: - Vectorization inside a subfunction - Benefiting...
  • Loren: Clare- Yes, sum can sum a double vector: x = [.3 .4 pi/3] y = sum(x) x = 0.3 0.4 1.0472 y = 1.7472 You must...
  • Clare J: R2007a - Student Version When I use sum to sum a vector of type double I get this error message: ???...
  • Sarah Zaranek: Hi Jacob, Sorry about the slow response. You are correct that the code would be slower without the...
  • Navaneethan Santhanam: Thanks a lot, Loren! That worked perfectly.
  • Mike N: Should it be OK to use “persistent 221; variables in a deployed application? What if I have two...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.

Related Topics