[cax, cm]=function loadTime(path,patientID) end %patientID='2SMobr'; path=[ path '/' patientID]; %load ventricle data %caFile=[ patientID '_Ventricle.mcsv']; %caFile=fullfile(path,caFile); %opts = detectImportOptions(caFile,'FileType','text'); %ca=readmatrix(caFile,opts); caDTFile=[ patientID '_Dummy.mcsv']; caDTFile=fullfile(path,caDTFile); opts = detectImportOptions(caDTFile,'FileType','text'); cma=readmatrix(caDTFile,opts); %convert to seconds->multiply time by 1e-3 and value (integral/t) with 1e3 cax=cma(:,1)*1e-3; %cay=ca(:,2)*1e3; cm=cma(:,2)*1e-3; %this is highly tuned. Assume nframe=20 %p=[1e-3 1e-2*ones(1,1) 1e-1*ones(1,3) ones(1,2) 10*ones(1,8) 100*ones(1,5)]; %w=cay/sum(cay); %w(1)=1; %caspline=csaps(cax,cay,p,[],w); %x=lsqnonlin(biexp,[20 3 10 5.5 0.1],[0,0,0,0,0],[Inf,Inf,Inf, Inf, Inf]); %chat0=[20, 3, 10, 5.5, 0.1]; %chat0=[10 0.8 10 100]; %lb=zeros(size(chat0)); %ub=Inf*ones(size(chat0)); %chat0=[chat0 cax(1:2)']; %lb=[lb cax(1:2)']; %ub=[ub cax(1:2)']; %chat=lsqcurvefit(@biexp,chat0 ,cax,cay,lb,ub); centers=loadCenters(path,patientID,nclass,realizationId);