View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 192 KB File ID: #32683 Version: 1.0
image thumbnail



Jonathan (view profile)


Morphs an array into another

| Watch this File

File Information

Did you ever need to smoothly turn an array into another?

This function morphs an input sequence into another, in a specified number of steps. Required inputs:
 * A : sequence start, array of scalars
 * B : sequence end, array of scalars
 * n : length of desired final sequence
 - [opt] met : method used for interpolation, defaults to 'linear' (equivalent to the option of interp1 function)

The final output has the size [size(B) n], so A and B can have as many dimensions as you want; the concatenation occurs on the dimension ndims(B)+1.

It doesn't matter if A and B are not the same size, as long as they have the same number of elements.

The example is given with images, but A and B can be any kind of sequence of numbers.

An additional interpolation method is provided for 'ease out' effects, the corresponding option is 'splinease'.

Enjoy ;)

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
09 Apr 2013 kevin

kevin (view profile)

just cute!

Contact us