How open files with quotation marks? or how to remove the quotation mark?

14 ビュー (過去 30 日間)
Roser Torrent
Roser Torrent 2012 年 7 月 30 日
Hi,
I'm computing the follow code:
[nom, ruta, filterindex] = uigetfile('*.mat', 'Obrir arxiu',MultiSelect', 'on')
quantitat_arxius = length (nom)
disp(['Has seleccionat:', nom(1:quantitat_arxius)]')
for(i=1:quantitat_arxius)
data = open(fullfile(ruta, nom(i)))
end
but there is an error, because nom[i] contains the name of the file with quotation mark, for example: 'file1' and fullfile wants to read the name without quotation mark: file1
How I can remove the quotation marks? or How I can open my 'file1'?
Thanks in advance,
Roser

採用された回答

Oleg Komarov
Oleg Komarov 2012 年 7 月 30 日
Use
nom{i}
The curly brackets are used to access the content of cell arrays. Round brackets on cell arrays select the content AND the cell "wrapper".

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by