Mercurial > hg > octave-lyh
diff scripts/java/dlgtest.m @ 15750:05c781cca57e
use numel instead of length in newly imported java functions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 07 Dec 2012 18:03:01 -0500 |
parents | 9fee0b741de6 |
children |
line wrap: on
line diff
--- a/scripts/java/dlgtest.m +++ b/scripts/java/dlgtest.m @@ -59,7 +59,7 @@ disp('- test listdlg with selectionmode single. No caption, no prompt.'); itemlist = {'An item \\alpha', 'another', 'yet another'}; s = listdlg ( 'ListString',itemlist, 'SelectionMode','Single' ); - imax = length(s); + imax = numel (s); for i=1:1:imax disp(['Selected: ',num2str(i),': ', itemlist{s(i)}]); end @@ -71,7 +71,7 @@ 'Name','Selection Dialog', ... 'InitialValue',[1,2,3,4], 'PromptString',{'Select an item...', '...or multiple items'} ); - imax = length(s); + imax = numel (s); for i=1:1:imax disp(['Selected: ',num2str(i),': ', itemlist{s(i)}]); end