フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to not randomly show the pictures....

1 回表示 (過去 30 日間)
Glenn Macion
Glenn Macion 2015 年 3 月 24 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
the code below is an answer from a very nice person, Guillaume.... thanks for this answer.... my next question is, what if i decide to not randomly show the pictures in this array....? how do i use imshow(); to show the pictures in this array according to how it has been sorted.... from apple.jpg to Penguins.jpg, instead of doing it randomly..?
folder = 'F:\school\matlab\project\pictures\pictures alone'; files = {'apple.jpg','condor.jpg','elephant.jpg',... 'Koala.jpg','orange.jpg','whale.jpg','Penguins.jpg'};
%pick one at random and show: imshow(fullfile(folder, files{randi(numel(files))})); pause(5) %pick another at random, it may be the same imshow(fullfile(folder, files{randi(numel(files))}));
%reorder the array randomly: randomisedfiles = files(randperm(numel(files))); %etc.
thank you for reading.. i really hope i could get an answer soon...

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by