Index in position 2 exceeds array bounds
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I have this script
%%
% DEFINIZIONE PARAMETRI DINAMICI
%DEFINIZIONE vettore frequenze
F_plot=400; %Frequenza limite dell'analisi
df=0.1;
f=[0:df:F_plot];
w=2*pi*f;
%%
% COSTRUZIONE SS
csi=0.0024; % smorzamento percentuale -- 0.05 è il valore nella flexsspf
FREQ_equi=load(['freq_prop.txt']);
pfdx_equi=load(['pffe.txt']);
%modi=[1:length(FREQ_equi)]';
%gamma_equi=pfdx_equi(:,2); % matrice dei fattori di partecipazione modale
save('PF1_equi.dat','pfdx_equi', '-ascii') % | modo | PF1 | PF2 | ... | PFr |
save('FREQ1_equi.dat','FREQ_equi', '-ascii') % | modo | freq
type=1; % 1 se spostamento ( q ), 2 se accelerazione ( q** )
[Aq,Bq,Cq,Dq]=flexsspf('','PF1_equi.dat','freq_prop.txt',csi,type);
sysansq_equi=ss(Aq,Bq,Cq,Dq);
%%
% vado a plottare il modulo della funzione di risposta in frequenza
[mags,phases]=bode(sysansq_equi,w);
[output,input,frequencies]=size(mags);
figure (1)
semilogy(f,squeeze(mags(:,1,:)),'linewidth',1)
hold on
grid on
title('Mag FRFs uscite/ingressi')
xlabel('Frequency [Hz]')
ylabel('Mag FRF [Disp Unit/Force Unit]')
legend('q1','q2','q3','q4','q5','q6','q7','q8','q9','q10');
and this error is occurred
In untitled34 (line 43)
Index in position 2 exceeds array bounds.
Error in untitled34 (line 56)
semilogy(f,squeeze(mags(:,1,:)),'linewidth',1)
Can i solve this problem?
6 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!