From: Moritz H?ckell on
Hi Ruchika
I'm starting to create a FDD code. Is your code supposed to work as it is wirtten below...I just had a lool on it.....in line 6 already "x" is missing..

"Ruchika " <xian1986(a)yahoo.com> wrote in message <gpbmq1$bct$1(a)fred.mathworks.com>...
> Dear All,
> I am working on creating a matlab code for Frequency Domain Decomposition and then Frequency Spatial Domain Decomposition.
> I have finished the FDD code and need to add the portion for the logdec method to be used for finding the damping ratio to make it the FSDD code but i'm not sure how to do it.
> Please do look at the following code and help me out.
> Also please suggest changes in the code if it seems incorrect to you.
>
> freql=[3.90 7.42 9.96];
> N=8;
> frst=100/512;
> L=length(freql);
> [b,a]=butter(8,0.3);
> x=filter(b,a,x);
> for i=1:N
> x1=x(:,i);
> xm=mean(x1);
> x1=x1-xm;
> x(:,i)=x1;
> end;
> y=xcorr(x);
> wn=hann(length(y));
> for i=1:N^2
> y1=y(:,i);
> y1=wn.*y1;
> y(:,i)=y1;
> end;
> z=(fft(y,1024));
> frlm=floor(freql/frst);
>
> for i=1:L
> evl=frlm(i);
> x1(1:N^2)=z(evl,:);
> for j=1:N
> for k=1:N
> x2(j,k)=x1((j-1)*N+k);
> end;
> end;
> [U,S,V]=svd(x2);
> modeshap(i,:)=U(:,1);
> end;
>
> for i=1:L
> cntr=frlm(i);
> str=cntr-5;
> endss=cntr+5;
> for j=str:endss
> xn(j,i)=z(j,1);
> end;
> end;
>
> for i=1:L
> x12=xn(:,i);
> xtt(:,i)=ifft(x12,1024);
> end;
> xtt=real(xtt);
> modes=real(modeshap);
>
> Thanking you in anticipation,
> Warm Regards,
> Ruchika.
From: Moritz H?ckell on
Ok...so x is a random data-vector is think...would be helpful if you could post some commented text....
 | 
Pages: 1
Prev: c -> Matlab
Next: Multi-color line plot