removing an variable from a list of strings

5 ビュー (過去 30 日間)
Andy 2011 年 10 月 3 日
so i have this list of string called str, it says cell in matlab. How can i remove any arbitrary variable from that list?
so i have
d = dir;
str = {};
[s,v] = listdlg('PromptString','Select a file:',...
where str is a list of the files in the directory. I want to remove an arbitary variable in it (i dont want to delete from the directory, just remove it from str) how would i do that? Thanks

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 10 月 3 日
str([1 3 5])=[]
You might want to check out the function uigetfile(), uigetdir()


Help Center および File ExchangeFile Operations についてさらに検索


Community Treasure Hunt

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

Start Hunting!

Translated by