Ik lees de CSV file in en specificeer waar in de file de relevante data staat. Echter als ik de plot will runnen dan krijg ik de volgende foutmelding
Code: Selecteer alles
??? Error using ==> boxplot
Too many input arguments.
Code: Selecteer alles
function boxplots
h=gcf
close(h)
% Import wildtype track speed
[filename,pathname,index]=uigetfile('*.csv','select wildtype data file','/Users/wmasseli/Desktop/microscopy data');
fid1=fopen(strcat(pathname,filename));
% Import speed file
[filename,pathname,index]=uigetfile('*.csv','select mutant data file','/Users/wmasseli/Desktop/microscopy data');
fid2=fopen(strcat(pathname,filename));
% Read 3 header lines
HeadersX = textscan(fid1, repmat('%s', 1, 4), 3, 'Delimiter', ',')
% Read body
DataX = textscan (fid1, '%f%s%s%d', 'Delimiter', ',')
%Close file
fid1 = fclose(fid1);
% Read 3 header lines
HeadersY = textscan(fid2, repmat('%s', 1, 4), 3, 'Delimiter', ',')
% Read body
DataY = textscan (fid2, '%f%s%s%d', 'Delimiter', ',')
%Close file
fid2= fclose(fid2);
X = DataX {:,1};
Y = DataY {:,1};
boxplot([X,Y], 'notch', 'on')
% Create xlabel
s1 = HeadersX{1,1}(1,1);
s2 = DataX{1,2}(1,1);
s = [s1,s2];
xlabel(s,'FontSize',16);
% Create title
title('boxplot comparison','FontSize',20);
end
Voor de volledigheid, de .csv files hebben de volgende lay-out
Code: Selecteer alles
Track Duration
====================
Value,Unit,Category,ID,
54.000,s,Track,1000000000,
47.000,s,Track,1000000001,
44.000,s,Track,1000000002,
43.000,s,Track,1000000003,
3.000,s,Track,1000000004,
35.000,s,Track,1000000005,
29.000,s,Track,1000000006,
27.000,s,Track,1000000007,
27.000,s,Track,1000000008,
25.000,s,Track,1000000009,