textscan error - name-value pair arguments must come in pairs
Show older comments
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 Comments
Julian Hapke
on 20 Jun 2017
Edited: Julian Hapke
on 20 Jun 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
on 21 Jun 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');
Accepted Answer
More Answers (1)
Walter Roberson
on 21 Jun 2017
A = textscan(line, '%*[^:]:%d');
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!