필터 지우기
필터 지우기

removing an variable from a list of strings

조회 수: 1 (최근 30일)
Andy
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 = {d.name};
[s,v] = listdlg('PromptString','Select a file:',...
'SelectionMode','multiple',...
'ListString',str)
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={'a','b','c','d','e','f'};
str([1 3 5])=[]
You might want to check out the function uigetfile(), uigetdir()

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by