clear all
numfiles = input('Enter no. of files');
mydata = cell(1, numfiles);
for k = 1:numfiles
myfilename = sprintf('DAT0000%d.csv', k-1);
[num,txt,raw{k}] = csvread(myfilename);
n{k}=raw{k}(1,1);
n{k}=cell2mat(n{k});
DCRfile{k} = raw{k}(2:(n{k}+1),:);
DCRfile{k}(:,2)=[];
DCRfile{k}=string(DCRfile{k});
DCRfile{k}(:,1)=erase(DCRfile{k}(:,1),'ms');
DCRfile{k}(:,2)=erase(DCRfile{k}(:,2),'kA');
DCRfile{k}(:,3)=erase(DCRfile{k}(:,3),'V');
DCRfile{k}=double(DCRfile{k});
for i = 1:n{k}
DCR{k}(i) = (DCRfile{k}(i,3))/(DCRfile{k}(i,2))*1000;
end
[Rmin{k},Tmin{k}] = min(DCR{k});
Rmax{k} = 0;
for i = Tmin{k}:n{k}
if Rmax{k} < DCR{k}(i)
Rmax{k} = DCR{k}(i);
end
end
Beta{k} = Rmax{k};
Tmax{k} = find(DCR{k}==Beta{k});
DCRmean{k}=sum(DCR{k})/n{k};
for i = 1:n{k}
HI{k}(i) = DCRfile{k}(i,2)*DCRfile{k}(i,2)*DCR{k}(i)/1000;
end
THI{k}=sum(HI{k});
end
8 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665832
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665832
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665867
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665867
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665868
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665868
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665876
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665876
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665878
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665878
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665879
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665879
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665881
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665881
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665882
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/442280-how-to-solve-error-using-csvread-too-many-output-arguments#comment_665882
Sign in to comment.