필터 지우기
필터 지우기

get inverse fourier Optimization, how can i do?

조회 수: 2 (최근 30일)
denis bertin
denis bertin 2017년 9월 19일
편집: denis bertin 2017년 9월 29일
Hi everyone,
I have these attached file name: datineltempo_ciclico.m that read file name malta1t.mat,
in th line 95, there is the peace of code like this:
NPF = 942;
N=2001;
v=381x1;(complex numbers)
f=381x1;
t=1x2001;
for(k = 1:NPF)
v = datif2(:,k);
g = zeros(2001,1);
du=f(2)-f(1);
for k1=1:N
integrando=exp(i*2*pi*t(k1)*f).*v;
g(k1)=du*sum(integrando);
end
v1 = g;
v1 = 2 * real(v1);
datit(:,k) = v1;
%k
end
.....
The problem is that is take more time to load the 942*2001 matrix;
Please somebody can i help me optimize(make faster) this loop?
Many thanks.
I need the maximum time reduce execution...
Please Help Me....

답변 (1개)

Christoph F.
Christoph F. 2017년 9월 20일
The "clean" solution would be to use MATLABs fft()/ifft() functions. They are optimized and also work for vector sizes that are not a power of two.
  댓글 수: 2
denis bertin
denis bertin 2017년 9월 20일
편집: denis bertin 2017년 9월 20일
Thank you Christoph, but i don't know how can do it without modify the current result. Please help me with the code,then i would learn how you are done it. I attached to problem all necessaries files.
Many thanks.
denis bertin
denis bertin 2017년 9월 29일
Please Help me with a code... Many Thank's

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by