Code covered by the BSD License  

Highlights from
Nested Functions in MATLAB

4.66667

4.7 | 3 ratings Rate this file 13 Downloads (last 30 days) File Size: 2.23 KB File ID: #8525
image thumbnail

Nested Functions in MATLAB

by

 

21 Sep 2005 (Updated )

This example shows how to use nested functions to avoid making copies of large arrays in MATLAB.

| Watch this File

File Information
Description

twoFigs.m is an example M-file to accompany the article "Nested Functions in MATLAB" in the January 2006 issue of The MathWorks News & Notes.

twoFigs.m is an example 2-figure GUI that uses nested functions to manage the data and state. Since the data is an image, it could be large and this example shows you how to use nested functions to avoid unnecessary copies of such data. Try it with this example:

% Substitute mandrill with
% any indexed image here
load mandrill
rgb = ind2rgb(X,map);
twoFigs(rgb)

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
29 May 2007 Alan Lai

Downloaded this after seeing Loren talk about it at the Mathworks World Tour in Melbourne.

17 Sep 2006 sathish kumar

it is very useful tips for studends as well as matlab users

05 May 2006 Andre Sant'Anna

Didn't know you could do this !

Updates
03 Jun 2009

Insert correct copyright.

Contact us