% This script load the entire SCaseDB and performs statisctical analyses %% Initialisation of paths % Should be replaced by a function dataDir = '../../../data'; % location of data logDir = 'log'; % log file in xls folder xlsDir = [dataDir '/Excel/xlsFromMatlab']; matlabDir = [dataDir '/matlab']; tic; %% Load ScaseDB matlabFile = 'SCaseDB.mat'; matlabFile = [matlabDir '/' matlabFile]; if exist(matlabFile, 'file') load(matlabFile); % Load SCase dat file else error('Not valid matlab file'); end %% Select SCase with valid anatomical measurements SCase = ShoulderCase; % Create new object ShoulderCase iSCase = 0; % Index for SCase for iSCaseDB = 1:length(SCaseDB) % Loop on all SCase if ~isempty(SCaseDB(iSCaseDB).shoulder.side) iSCase = iSCase + 1; SCase(iSCase) = SCaseDB(iSCaseDB); end end %% Select normal and pathological SCase SCaseN = ShoulderCase; % Create new object ShoulderCase for normal SCaseP = ShoulderCase; % Create new object ShoulderCase for pahtological iSCaseN = 0; % Index for SCaseN iSCaseP = 0; % Index for SCaseP for iSCase = 1:length(SCase) % Loop on all valide SCase if strcmp(SCase(iSCase).id(1), 'N') % SCase is normal iSCaseN = iSCaseN + 1; SCaseN(iSCaseN) = SCase(iSCase); else iSCaseP = iSCaseP + 1; SCaseP(iSCaseP) = SCase(iSCase); end end %% Compare normal to pathological % Check way to compare histogram with different number of patients for iSCaseN = 1:length(SCaseN) varN(iSCaseN) = SCaseN(iSCaseN).shoulder.scapula.acromion.IE; end for iSCaseP = 1:length(SCaseP) varP(iSCaseP) = SCaseP(iSCaseP).shoulder.scapula.acromion.IE; end hold off histogram(varN); hold on; histogram(varP); %% toc