textscan error - name-value pair arguments must come in pairs
Afficher commentaires plus anciens
Hi,
I keep getting the following error:
Error using textscan
Name-value pair arguments must come in pairs.
fid = fopen(char(name),'r');
disp(name);
line = fgetl(fid);
line = fgetl(fid);
EID = sscanf(line,'%s');
line = fgetl(fid);
line = fgetl(fid);
A = textscan(line,'%s','%\t');
FlEx = str2num(cell2mat(A{1,1}(5)))
line =
Fluorescence excitation wavelength (nm): 405
Does someone know how to solve this problem?
3 commentaires
Julian Hapke
le 20 Juin 2017
Modifié(e) : Julian Hapke
le 20 Juin 2017
as the error says, you are not giving name/value pairs. have a look at the documentation of textscan, to see what the function expects. To assist you further, we will need to know that you want to get from your string in "line". I guess the wavelength as integer?
Adam
le 21 Juin 2017
It isn't possible for the reason the error message says. There is no syntax of textscan that matches yours.
At a guess you maybe meant:
A = textscan(line,'%s', 'Delimiter', '%\t');
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 21 Juin 2017
A = textscan(line, '%*[^:]:%d');
Catégories
En savoir plus sur Large Files and Big Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!