Commit bc4c3535 authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

ani analysis eqs, tabes, and figures

parent af04fa2c
clear all; close all;
% sp = load('paramspace/pspaceisoparam.txt');
% sp = load('paramspace/pspaceaniparam.txt');
sp = load('paramspace/pspaceaniparam.txt');
partex = {'\mu', '\sigma', 'P'};
......@@ -14,7 +14,7 @@ lbs = {'$a_0$ (intercept)', '$a_1$ ($\mu$)','$a_2$ ($\sigma$)', ...
nsim = size(sp, 1);
% collect results
sigma = linspace(0, 2.5e-2, 26);
maxsig = zeros(nsim, 1);
maxsig = zeros(nsim, 1); dminl = maxsig;
l = zeros(nsim, numel(sigma));
R = l; dLl = l; dLr = l;
mkapl = l; mkapr = l; skapl = l; skapr = l; mkapc = l; skapc = l;
......@@ -43,6 +43,9 @@ for s = 1:nsim
mkapc(s, 2:size(results, 1)+1) = results(:, 11);
% std kappa (centre)
skapc(s, 2:size(results, 1)+1) = results(:, 12);
% dminl
lt = l(s, ~isnan(l(s, :)) & l(s, :) > 0 );
dminl(s) = (lt(end) - min(lt))/lt(end);
else
l(s, 2:size(results, 1)+1) = -1; % projected length
......@@ -84,10 +87,7 @@ X = sp(:, 2:4); %[mu sigma P]
% % set(gca,'ytick',2:.5:4)
% % svgprint(get(gca, 'parent'), 'pics/pspacefailed')
% probe stats at sigma = 0.015 MPa
yoi = find(sigma == 0.015);
% % pspaceiso_eqstabs(X, Y, yvar, fname)
% maximum sigma reached
Y = maxsig(gidx);
figure
[c, bp] = hist(Y, 25);
......@@ -95,18 +95,33 @@ h = bar(bp, c);
set(h, 'facecolor', [.8 .8 .8], 'linestyle', 'none')
xlabel('$\max \sigma_x$\,[MPa]')
ylabel('count\,[-]')
% svgprint(get(gca, 'parent'), 'pics/isospace_msig_fig')
% svgprint(get(gca, 'parent'), 'pics/anispace_msig_fig')
pspaceani_eqstabs(X(gidx, :), Y, '\max \sigma_x', 'anispace_msig');
% depth of minimum
Y = dminl(gidx);
figure
[c, bp] = hist(Y, 25);
h = bar(bp, c);
set(h, 'facecolor', [.8 .8 .8], 'linestyle', 'none')
xlabel('$\overline{\min l(\sigma)}\,[-]')
ylabel('count\,[-]')
% svgprint(get(gca, 'parent'), 'pics/anispace_md_fig')
pspaceani_eqstabs(X(gidx, :), Y, '\overline{\min l(\sigma)}', 'anispace_md');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% probe stats at sigma = 0.015 MPa
yoi = find(sigma == 0.015);
% initialise
cfi = zeros(size(X, 2)+1, 2); cfl = zeros(size(X, 2)+1, numel(sigma));
cfh = cfl; cfps = cfl; levar = cfl; no = zeros(size(X, 2)+1, 1);
mjet = colormap(jet); mjet(1, :) = [1 1 1];
% analyse l/l(1) = a*Efilm+b*tfilm+c*tcells+d*width+error
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% analyse l/L
range = linspace(0, 1, 50);
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
......@@ -135,11 +150,8 @@ plot(sigma, no, 'linewidth', 2)
axis([0 0.025 0 100])
xlabel('$\sigma_x$\,[MPa]')
ylabel('\# observations\,[-]')
% svgprint(get(gca, 'parent'),'pics/pspaceiso_n')
% svgprint(get(gca, 'parent'),'pics/pspaceani_n')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% analyse l/L
figure
imagesc(range, -sigma, htd)
hold on
......@@ -150,25 +162,73 @@ text(1/(2*pi), 0, '$\frac{1}{2\piup}$', 'color', [1 0 0], 'verticalalignment', '
xlabel('$\frac{l}{L}$\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/isospace_lL_fig')
for v = 1:4
ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
figure
patch(ss, cf, 'b', 'facealpha', 0.5)
hold on
plot(sigma(2:size(cfl, 2)), (cfl(v, 2:end)+cfh(v, 2:end))/2, ...
'r', 'linewidth', 2)
xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% svgprint(get(gca, 'parent'), strcat('pics/pspaceani_lL_a', num2str(v-1)))
end
% svgprint(get(gca, 'parent'), 'pics/anispace_lL_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
% figure
% patch(ss, cf, 'b', 'facealpha', 0.5)
% hold on
% plot(sigma(2:size(cfl, 2)), (cfl(v, 2:end)+cfh(v, 2:end))/2, ...
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_lL_a', num2str(v-1)))
% end
%%% analysis for l/L: sigma_x = 0.015
Y = l(gidx, yoi)./l(gidx, 1);
% % pspaceani_eqstabs(X(gidx, :), Y, '\frac{l}{L}(\sigma_x = 0.015\,\text{MPa})', 'anispace_lL');
pspaceani_eqstabs(X(gidx, :), Y, '\frac{l}{L}(\sigma_x = 0.015\,\text{MPa})', 'anispace_lL');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% analyse delta kappa
range = linspace(-0.6, 0.6, 50);
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
Y = (mkapl(:, y)-mkapr(:, y))./mean([mkapl(:, y) mkapr(:, y)], 2);
if sum(~isnan(Y)) > 7
mdl = fitlm(X, Y);
% 95% confidence intervals for the coefficients
cfci = mdl.coefCI; % intercept + coefficients
cfl(:, y) = cfci(:, 1); % intercept + coefficients
cfh(:, y) = cfci(:, 2); % intercept + coefficients
% p-values
cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% perform anova
amdl = anova(mdl); % coefficients + error
% contribution
levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% # observations
no(y) = mdl.NumObservations;
end
% histogram counts for overview
htd(y, :) = hist(Y, range);
end
figure
imagesc(range, -sigma, htd)
xlabel('$\Deltaup \kappa$\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/anispace_lL_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
% figure
% patch(ss, cf, 'b', 'facealpha', 0.5)
% hold on
% plot(sigma(2:size(cfl, 2)), (cfl(v, 2:end)+cfh(v, 2:end))/2, ...
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_dk_a', num2str(v-1)))
% end
%%% analysis for delta kappa: sigma_x = 0.015
Y = (mkapl(gidx, yoi)-mkapr(gidx, yoi))./mean([mkapl(gidx, yoi) mkapr(gidx, yoi)], 2);
pspaceani_eqstabs(X(gidx, :), Y, '\Deltaup \kappa (\sigma_x = 0.015\,\text{MPa})', 'anispace_dk');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -200,8 +260,8 @@ imagesc(range, -sigma, htd)
xlabel('$\lambda_L$ (left)\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/isospace_dLl_fig')
%
% svgprint(get(gca, 'parent'), 'pics/anispace_dLl_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
......@@ -214,11 +274,12 @@ colormap(mjet); caxis([0 max(htd(:))]); colorbar
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_dLl_a', num2str(v-1)))
% end
%
% %%% analysis for lambda_L (left): sigma_x = 0.015
% Y = dLl(gidx, yoi)./dLl(gidx, 1);
% % pspaceani_eqstabs(X(gidx, :), Y, '\lambda_L(\sigma_x = 0.015\,\text{MPa})', 'isospace_dLl');
%%% analysis for lambda_L (left): sigma_x = 0.015
Y = dLl(gidx, yoi)./dLl(gidx, 1);
pspaceani_eqstabs(X(gidx, :), Y, '\lambda_L^\text{l}(\sigma_x = 0.015\,\text{MPa})', 'anispace_dLl');
%%% and right
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
Y = dLr(gidx, y)./dLr(gidx, 1);
......@@ -245,8 +306,8 @@ imagesc(range, -sigma, htd)
xlabel('$\lambda_L$ (right)\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/isospace_dLr_fig')
%
% svgprint(get(gca, 'parent'), 'pics/anispace_dLr_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
......@@ -257,47 +318,91 @@ colormap(mjet); caxis([0 max(htd(:))]); colorbar
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceiso_dLr_a', num2str(v-1)))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_dLr_a', num2str(v-1)))
% end
%
% %%% analysis for lambda_L (right): sigma_x = 0.015
% Y = dLr(gidx, yoi)./dLr(gidx, 1);
% % pspaceani_eqstabs(X(gidx, :), Y, '\lambda_L(\sigma_x = 0.015\,\text{MPa})', 'isospace_dLr');
%
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % analyse delta kappa
% range = linspace(0, .6, 25);
% htd = zeros(numel(sigma), numel(range));
% for y = 2:size(l, 2)
% Y = sk(gidx, y)./mk(gidx, y);
% if sum(~isnan(Y)) > 7
% mdl = fitlm(X(gidx, :), Y);
% % 95% confidence intervals for the coefficients
% cfci = mdl.coefCI; % intercept + coefficients
% cfl(:, y) = cfci(:, 1); % intercept + coefficients
% cfh(:, y) = cfci(:, 2); % intercept + coefficients
% % p-values
% cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% % perform anova
% amdl = anova(mdl); % coefficients + error
% % contribution
% levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% % # observations
% no(y) = mdl.NumObservations;
% end
% % histogram counts for overview
% htd(y, :) = hist(Y, range);
%%% analysis for lambda_L (right): sigma_x = 0.015
Y = dLr(gidx, yoi)./dLr(gidx, 1);
pspaceani_eqstabs(X(gidx, :), Y, '\lambda_L^\text{r}(\sigma_x = 0.015\,\text{MPa})', 'anispace_dLr');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% analyse kappa_e (left / right)
range = linspace(0, 2.5, 50);
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
Y = skapl(gidx, y)./mkapl(gidx, y);
if sum(~isnan(Y)) > 7
mdl = fitlm(X(gidx, :), Y);
% 95% confidence intervals for the coefficients
cfci = mdl.coefCI; % intercept + coefficients
cfl(:, y) = cfci(:, 1); % intercept + coefficients
cfh(:, y) = cfci(:, 2); % intercept + coefficients
% p-values
cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% perform anova
amdl = anova(mdl); % coefficients + error
% contribution
levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% # observations
no(y) = mdl.NumObservations;
end
% histogram counts for overview
htd(y, :) = hist(Y, range);
end
figure
imagesc(range, -sigma, htd)
xlabel('$\kappa_\varepsilon$ (left)\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/anispace_kel_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
% figure
% patch(ss, cf, 'b', 'facealpha', 0.5)
% hold on
% plot(sigma(2:size(cfl, 2)), (cfl(v, 2:end)+cfh(v, 2:end))/2, ...
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_kel_a', num2str(v-1)))
% end
% figure
% imagesc(range, -sigma, htd)
% xlabel('$\kappa_\varepsilon$\,[-]')
% ylabel('$\sigma_x$\,[MPa]')
% colormap(mjet); caxis([0 max(htd(:))]); colorbar
% % svgprint(get(gca, 'parent'), 'pics/isospace_dk_fig')
%
% for v = 1:9
%%% analysis for kappa_e (left): sigma_x = 0.015
Y = skapl(gidx, yoi)./mkapl(gidx, yoi);
pspaceani_eqstabs(X(gidx, :), Y, '\kappa_\varepsilon^\text{l}(\sigma_x = 0.015\,\text{MPa})', 'anispace_kel');
%%% and right
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
Y = skapr(gidx, y)./mkapr(gidx, y);
if sum(~isnan(Y)) > 7
mdl = fitlm(X(gidx, :), Y);
% 95% confidence intervals for the coefficients
cfci = mdl.coefCI; % intercept + coefficients
cfl(:, y) = cfci(:, 1); % intercept + coefficients
cfh(:, y) = cfci(:, 2); % intercept + coefficients
% p-values
cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% perform anova
amdl = anova(mdl); % coefficients + error
% contribution
levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% # observations
no(y) = mdl.NumObservations;
end
% histogram counts for overview
htd(y, :) = hist(Y, range);
end
figure
imagesc(range, -sigma, htd)
xlabel('$\kappa_\varepsilon$ (right)\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/anispace_ker_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
% figure
......@@ -307,63 +412,92 @@ colormap(mjet); caxis([0 max(htd(:))]); colorbar
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceiso_dk_a', num2str(v-1)))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_ker_a', num2str(v-1)))
% end
%
%
% %%% analysis for delta kappa: sigma_x = 0.01
% Y = sk(gidx, end)./mk(gidx, end);
% % pspaceiso_eqstabs(X(gidx, :), Y, '\kappa_\varepsilon(\sigma_x = 0.025\,\text{MPa})', 'isospace_dk');
%
% close all;
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % analysis for R * mean(kappa)
% range = linspace(0.85, 1.25, 25);
% htd = zeros(numel(sigma), numel(range));
% for y = 2:size(l, 2)
% Y = R(gidx, y).*mk(gidx, y);
% if sum(~isnan(Y)) > 7
% mdl = fitlm(X(gidx, :), Y);
% % 95% confidence intervals for the coefficients
% cfci = mdl.coefCI; % intercept + coefficients
% cfl(:, y) = cfci(:, 1); % intercept + coefficients
% cfh(:, y) = cfci(:, 2); % intercept + coefficients
% % p-values
% cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% % perform anova
% amdl = anova(mdl); % coefficients + error
% % contribution
% levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% % # observations
% no(y) = mdl.NumObservations;
% end
% % histogram counts for overview
% htd(y, :) = hist(Y, range);
% % ny = Y(~isnan(Y)); ny = 10*(ny-0.8);
% % rparam = fib_estdist('phi', ny, 'fibtype', 'rayleigh');
% % eparam = fib_estdist('phi', ny, 'fibtype', 'extremev');
% % figure
% % % plot (nomalised) simulation angle histogram (convert to degrees)
% % [n, bp] = fib_hist(ny);
% % h = bar(bp, n/sum(n));
% % set(h, 'facecolor', [.8 .8 .8], 'linestyle', 'none')
% % hold on
% % % plot (normalised) envelope of input distribution
% % plot(bp, fib_gendist(rparam, 'rayleigh'), 'b', 'linewidth', 2)
% % plot(bp, fib_gendist(eparam, 'extremev'), 'r', 'linewidth', 2)
% %
% % Rparam(y, 1:3) = rparam;
% % Eparam(y, 1:3) = eparam;
%
%%% analysis for kappa_e (right): sigma_x = 0.015
Y = skapr(gidx, yoi)./mkapr(gidx, yoi);
pspaceani_eqstabs(X(gidx, :), Y, '\kappa_\varapsilon^\text{r}(\sigma_x = 0.015\,\text{MPa})', 'anispace_ker');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% analyse R_e (left / right)
range = linspace(0.5, 2.5, 50);
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
Y = R(gidx, y).*mkapl(gidx, y);
if sum(~isnan(Y)) > 7
mdl = fitlm(X(gidx, :), Y);
% 95% confidence intervals for the coefficients
cfci = mdl.coefCI; % intercept + coefficients
cfl(:, y) = cfci(:, 1); % intercept + coefficients
cfh(:, y) = cfci(:, 2); % intercept + coefficients
% p-values
cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% perform anova
amdl = anova(mdl); % coefficients + error
% contribution
levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% # observations
no(y) = mdl.NumObservations;
end
% histogram counts for overview
htd(y, :) = hist(Y, range);
end
figure
imagesc(range, -sigma, htd)
xlabel('$R_\varepsilon$ (left)\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/anispace_Rel_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
% figure
% patch(ss, cf, 'b', 'facealpha', 0.5)
% hold on
% plot(sigma(2:size(cfl, 2)), (cfl(v, 2:end)+cfh(v, 2:end))/2, ...
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_Rel_a', num2str(v-1)))
% end
% figure
% imagesc(range, -sigma, htd)
% xlabel('$R_\varepsilon$\,[-]')
% ylabel('$\sigma_x$\,[MPa]')
% colormap(mjet); caxis([0 max(htd(:))]); colorbar
% % svgprint(get(gca, 'parent'), 'pics/isospace_dR_fig')
%
% for v = 1:9
%%% analysis for kappa_e (left): sigma_x = 0.015
Y = R(gidx, y).*mkapl(gidx, y);
pspaceani_eqstabs(X(gidx, :), Y, 'R_\varepsilon^\text{l}(\sigma_x = 0.015\,\text{MPa})', 'anispace_Rel');
%%% and right
htd = zeros(numel(sigma), numel(range));
for y = 2:size(l, 2)
Y = R(gidx, y).*mkapr(gidx, y);
if sum(~isnan(Y)) > 7
mdl = fitlm(X(gidx, :), Y);
% 95% confidence intervals for the coefficients
cfci = mdl.coefCI; % intercept + coefficients
cfl(:, y) = cfci(:, 1); % intercept + coefficients
cfh(:, y) = cfci(:, 2); % intercept + coefficients
% p-values
cfps(:, y) = mdl.Coefficients.pValue; % intercept + coefficients
% perform anova
amdl = anova(mdl); % coefficients + error
% contribution
levar(:, y) = amdl.SumSq/sum(amdl.SumSq); % coefficients + error
% # observations
no(y) = mdl.NumObservations;
end
% histogram counts for overview
htd(y, :) = hist(Y, range);
end
figure
imagesc(range, -sigma, htd)
xlabel('$R_\varepsilon$ (right)\,[-]')
ylabel('$\sigma_x$\,[MPa]')
colormap(mjet); caxis([0 max(htd(:))]); colorbar
% svgprint(get(gca, 'parent'), 'pics/anispace_Rer_fig')
% for v = 1:4
% ss = [sigma(2:size(cfl, 2)), flipdim(sigma(2:size(cfh, 2)), 2)];
% cf = [cfl(v, 2:end), flipdim(cfh(v, 2:end), 2)];
% figure
......@@ -373,9 +507,9 @@ colormap(mjet); caxis([0 max(htd(:))]); colorbar
% 'r', 'linewidth', 2)
% xlabel('\raisebox{-0.5em}{$\sigma_x$\,[MPa]}')
% ylabel(strcat('\raisebox{1em}{',lbs{v},'}'))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceiso_dR_a', num2str(v-1)))
% % svgprint(get(gca, 'parent'), strcat('pics/pspaceani_Rer_a', num2str(v-1)))
% end
%
% % analysis for R * mean(kappa) @ sigma_x = 0.025
% Y = R(gidx, end).*mk(gidx, end);
% % pspaceiso_eqstabs(X(gidx, :), Y, 'R_\varepsilon(\sigma_x = 0.025\,\text{MPa})', 'isospace_dR');
%%% analysis for kappa_e (right): sigma_x = 0.015
Y = R(gidx, y).*mkapr(gidx, y);
pspaceani_eqstabs(X(gidx, :), Y, 'R_\varapsilon^\text{r}(\sigma_x = 0.015\,\text{MPa})', 'anispace_Rer');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment