Change subaxis to subplot

This commit is contained in:
2019-10-14 16:45:24 +02:00
parent 075bf199da
commit cdbd62b3ee
9 changed files with 45 additions and 45 deletions

View File

@@ -10,7 +10,7 @@ load('./mat/config.mat', 'save_fig', 'freqs');
%% Plant
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))));
@@ -23,7 +23,7 @@ ylabel('Amplitude [m/N]');
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
@@ -44,7 +44,7 @@ if save_fig; exportFig('comp_models_plant_x_x', 'normal-normal', struct('path',
%%
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dz', 'Fnz'), freqs, 'Hz'))));
@@ -57,7 +57,7 @@ ylabel('Amplitude [m/N]');
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_vc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_pz.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
@@ -80,7 +80,7 @@ figure;
for i_input = 1:3
for i_output = 1:3
subaxis(3,3,3*(i_input-1)+i_output);
subplot(3,3,3*(i_input-1)+i_output);
hold on;
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart(i_output, i_input), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart(i_output, i_input), freqs, 'Hz'))));

View File

@@ -7,10 +7,10 @@ load('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');
%% Load Configuration file
load('./mat/config.mat', 'save_fig', 'freqs');
%%
%%
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_iff('Fm1', 'F1'), freqs, 'Hz'))));
@@ -23,7 +23,7 @@ ylabel('Amplitude [m/N]');
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_pz.G_iff('Fm1', 'F1'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');

View File

@@ -23,7 +23,7 @@ dir = 'y';
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms_flexible(['Dg' dir], ['Fg' dir]), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_ms_ty_rigid(['Dg' dir], ['Fg' dir]), freqs, 'Hz'))), '--');
@@ -33,7 +33,7 @@ set(gca, 'XTickLabel',[]);
legend({'Flexible', 'Ty - Rigid'});
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms_flexible(['Dg' dir], ['Fg' dir]), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms_ty_rigid(['Dg' dir], ['Fg' dir]), freqs, 'Hz'))), '--');
@@ -49,7 +49,7 @@ dir = 'y';
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms_flexible(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_ms_ty_rigid(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))), '--');
@@ -59,7 +59,7 @@ set(gca, 'XTickLabel',[]);
legend({'Flexible', 'Ty - Rigid'});
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms_flexible(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms_ty_rigid(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))), '--');
@@ -75,7 +75,7 @@ dir = 'z';
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms_flexible(['Dg' dir], ['Fm' dir]), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_ms_ty_rigid(['Dg' dir], ['Fm' dir]), freqs, 'Hz'))), '--');
@@ -86,7 +86,7 @@ set(gca, 'XTickLabel',[]);
legend({'Flexible', 'Ty - Rigid'});
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms_flexible(['Dg' dir], ['Fm' dir]), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms_ty_rigid(['Dg' dir], ['Fm' dir]), freqs, 'Hz'))), '--');

View File

@@ -22,7 +22,7 @@ meas_sys = getDynamicTFs(m_object, 'marble', 'hexa', {{'tx', 'tx'},{'ty', 'ty'},
for dir = 'xyz'
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms(['Dg' dir], ['Fg' dir]), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(meas_sys(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))), '.');
@@ -32,7 +32,7 @@ for dir = 'xyz'
legend({'Model', 'Meas.'});
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms(['Dg' dir], ['Fg' dir]), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(meas_sys(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))), '.');
@@ -50,7 +50,7 @@ end
for dir = 'xyz'
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(meas_sys(['Dh' dir], ['Fh' dir]), freqs, 'Hz'))), '.');
@@ -60,7 +60,7 @@ for dir = 'xyz'
legend({'Model', 'Meas.'});
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms(['Dm' dir], ['Fm' dir]), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(meas_sys(['Dh' dir], ['Fh' dir]), freqs, 'Hz'))), '.');
@@ -71,7 +71,7 @@ for dir = 'xyz'
hold off;
linkaxes([ax1,ax2],'x');
if save_fig; exportFig(['comp_meas_m_m_' dir], 'normal-normal', struct('path', 'identification')); end
end
@@ -79,7 +79,7 @@ end
for dir = 'xyz'
figure;
% Amplitude
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_ms(['Dm' dir], ['Fg' dir]), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(meas_sys(['Dh' dir], ['Fm' dir]), freqs, 'Hz'))), '.');
@@ -89,7 +89,7 @@ for dir = 'xyz'
legend({'Model', 'Meas.'});
hold off;
% Phase
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms(['Dm' dir], ['Fg' dir]), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(meas_sys(['Dh' dir], ['Fm' dir]), freqs, 'Hz'))), '.');