Optimization of searching an interval from huge amount of data
Hello, I would like to apply a smoothing methology that is not available in MATLAB and the code is the following, "smoothFAS" is the variable that provides the smoothed curve (orange line in the plot below) using the original Fourier Amplitude plot (blue line in the plot). The problem is that is takes so much time to process just one single signal. Any help to optimize the search and the final result as I will need to process 100,000.00 signals. I provide an example of the data to process as txt files. I would appreciate the help.
Y=load(‘FAS.txt’);
frequency=load(frequency_FAS.txt);
d_window=0.05;
smoothFAS = zeros(size(Y));
for i=1:length(frequency)
disp(i./length(frequency)*100);
f_tmp = frequency./frequency(i);
w = zeros(size(f_tmp));
w(f_tmp>=10^(-d_window/2) & f_tmp<=10^(d_window/2))=1;
smoothFAS(i) = exp(sum(w’.*log(Y))./sum(w));
endHello, I would like to apply a smoothing methology that is not available in MATLAB and the code is the following, "smoothFAS" is the variable that provides the smoothed curve (orange line in the plot below) using the original Fourier Amplitude plot (blue line in the plot). The problem is that is takes so much time to process just one single signal. Any help to optimize the search and the final result as I will need to process 100,000.00 signals. I provide an example of the data to process as txt files. I would appreciate the help.
Y=load(‘FAS.txt’);
frequency=load(frequency_FAS.txt);
d_window=0.05;
smoothFAS = zeros(size(Y));
for i=1:length(frequency)
disp(i./length(frequency)*100);
f_tmp = frequency./frequency(i);
w = zeros(size(f_tmp));
w(f_tmp>=10^(-d_window/2) & f_tmp<=10^(d_window/2))=1;
smoothFAS(i) = exp(sum(w’.*log(Y))./sum(w));
end Hello, I would like to apply a smoothing methology that is not available in MATLAB and the code is the following, "smoothFAS" is the variable that provides the smoothed curve (orange line in the plot below) using the original Fourier Amplitude plot (blue line in the plot). The problem is that is takes so much time to process just one single signal. Any help to optimize the search and the final result as I will need to process 100,000.00 signals. I provide an example of the data to process as txt files. I would appreciate the help.
Y=load(‘FAS.txt’);
frequency=load(frequency_FAS.txt);
d_window=0.05;
smoothFAS = zeros(size(Y));
for i=1:length(frequency)
disp(i./length(frequency)*100);
f_tmp = frequency./frequency(i);
w = zeros(size(f_tmp));
w(f_tmp>=10^(-d_window/2) & f_tmp<=10^(d_window/2))=1;
smoothFAS(i) = exp(sum(w’.*log(Y))./sum(w));
end smoothing methodology MATLAB Answers — New Questions