MATLAB Answers


using MultiSelect for selecting multiple selection of images

Asked by Elysi Cochin on 1 Apr 2013

if i select images, i want to display those images.... and if i dont select any images.... i want to display the first 4 images from that folder..... how to do it sir.... please do reply....



No products are associated with this question.

1 Answer

Answer by Walter Roberson
on 1 Apr 2013
 Accepted answer

Use fullfile() instead of concatenating the pathname and filename.

You can detect no items selected by length(oldFileNames) being 0.

Getting the first 4 images in a folder can be done by using dir().


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!