View License

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

» Watch video

Highlights from
Resize N-D arrays and images

5.0 | 2 ratings Rate this file 31 Downloads (last 30 days) File Size: 6.42 KB File ID: #26385 Version: 1.3
image thumbnail

Resize N-D arrays and images


Damien Garcia (view profile)


15 Jan 2010 (Updated )

Y = RESIZE(X,newsize) resizes input array X using a discrete cosine transform.

| Watch this File

File Information

Y = RESIZE(X,NEWSIZE) resizes input array X using a DCT (discrete cosine transform) method. X can be any array of any size. Output Y is of size NEWSIZE.
Input and output formats: Y has the same class as X.
As an example, if you want to multiply the size of an RGB image by a factor N, use the following syntax:
newsize = size(I).*[N N 1];
J = resize(I,newsize);

% Upsample and stretch an RGB image
I = imread('onion.png');
sizeJ = size(I).*[2 2 1];
J = resize(I,sizeJ);
sizeK = size(I).*[1/2 2 1];
K = resize(I,sizeK);

Enter "help resize" to obtain other examples.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.11 (R2010b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
18 Aug 2013 William Warriner

Thank you for this. Useful in my work for voxel array sampling for further use with Floyd-Warshall algorithm. Large voxel arrays take obscene quantities of time with Floyd-Warshall, so periodic sampling is useful.

Thank you also for packaging the two required files.

06 Oct 2011 Lili

Lili (view profile)

Nice job! Thanks!!

16 Jan 2010 us

us (view profile)

why do you not put the required functions DCTN and IDCTN into the package as well(?)...


Comment only
22 Jan 2010 1.1

DCTN and IDCTN are now included, as requested

12 Oct 2014 1.2

The functions IDCTN and DCTN are now in RESIZE

12 Oct 2014 1.3


Contact us