Index in position 2 exceeds array bounds
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!