How do i extract values from a name-value pair argument?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
AUWAL ABUBAKAR
am 2 Apr. 2018
Kommentiert: AUWAL ABUBAKAR
am 3 Apr. 2018
Can someone help me on this please. my function is this; fid=fopen('20160613.XVI'); C=textscan(fid,'%s%s','CollectOutput',true,'Delimiter',';'); data=C{1}(71:73,1); [~]=fclose(fid);
It returns the following; {'CouchShiftLat=-0.17' } {'CouchShiftLong=-0.08' } {'CouchShiftHeight=-0.09'} But i needed only the values; -0.17,-0.08 and -0.09.
3 Kommentare
Akzeptierte Antwort
KSSV
am 2 Apr. 2018
files = dir('*.txt') ; % Get all text files of the folder
N = length(files) ; % Total files
% loop for each file
for i = 1:N
file = files(i).name ;
% do what you want
end
3 Kommentare
Stephen23
am 2 Apr. 2018
Bearbeitet: Stephen23
am 2 Apr. 2018
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Export finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!