help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: help uigetfile


From: Ian McCallion
Subject: Fwd: help uigetfile
Date: Mon, 21 Oct 2019 15:08:20 +0100

> On Mon, 21 Oct 2019 at 12:43, Pantxo <address@hidden> wrote:
> >
> > Joe Tusek wrote
> > > ...
> > > When I select one file, the returned fname has dimension of 1 x
> > > num_filename_chars. When I select multiple files, fname has dimension of
> > > 1 x numfiles. Is this the correct behaviour?
> >
> > files = uigetfile ("multiselect", "on")
> > numfiles = ifelse (iscell (files), numel (files), 1);
>
> ... and to cover the "no files: case that uigetfile returns numeric 0:
>
>     files = uigetfile ("multiselect", "on")
>     numfiles = ifelse (iscell (files), numel (files), 1-isnumeric(files))
>
> Cheers... Ian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]