1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
[num, txt, raw] = xlsread(filename);
%%%%Voxel Size%%%%%%%
idx_VS = strcmp(raw, 'Voxel size (µm)');
[x_VS,y_VS]=find(idx_VS);
newy_VS=y_VS+1;% car ta valeur est la case à coté
newx_VS=x_VS;
Voxel_Size=raw{newx_VS,newy_VS};
%%%%%Size%%%%%%%%%%%
idx_size = strcmp(raw, 'Last Z');
[x_size,y_size]=find(idx_size);
newy_size=y_size;% car ta valeur est la case à coté
newx_size=x_size+1;
Size=raw{newx_size,newy_size};
%%%%%%Slice number and Partial Porosity%%%%%%%%
idx_SN = strcmp(raw, 'Partial Porosity');
[x_SN,y_SN]=find(idx_SN);
newy_SN=y_SN;% car ta valeur est la case à coté
newx_SN_first=x_SN+2;
newx_SN_last=newx_SN_first+Size;
newy_PP=y_SN+2;
for i=newx_SN_first:newx_SN_last
SN(i+1-newx_SN_first,1)=raw{i,newy_SN};
PP(i+1-newx_SN_first,1)=raw{i,newy_PP};
end
figure(1)
plot(PP,SN) |
Partager