Read a matrix between elements
이전 댓글 표시
Hey Guys, I need to read two variables, that have a large amount of samples(30 million values).
I need to select a thousand values from that two variables, correlate them and produce a plot. Then I want to do this again, with new thousand samples, produce a new plot, and so on, till the end of the 30 million values.
I have this code:
So in the first iteration I want Reference_signal_samples(1:1000) and Surveillance_signal_samples(1:1000), do the code
[afmag3,delay3,doppler3], see the plot after the for loop and save it. Next iteration I want Reference_signal_samples(4000:5000) and Surveillance_signal_samples(4000:5000), do the code
[afmag3,delay3,doppler3], see the plot after the for loop and save it. Between iteration I want a step of 3000 samples.
How can i do this in my code, I ve been trying but I cant achieve it
pulse_size = 1000;
%nRef = numel(Reference_signal)/Fs;
%nSurv = numel(Surveillance_signal)/Fs;
nRef = numel(Reference_signal)/pulse_size;
nSurv = numel(Surveillance_signal)/pulse_size;
for k = 1:nRef
Reference_signal_samples =Reference_signal((k-1)*pulse_size+(1:pulse_size));
for kk =1:nSurv
Surveillance_signal_samples=Surveillance_signal((kk-1)*pulse_size+(1:pulse_size));
[afmag3,delay3,doppler3] = ambgfun(Reference_signal_samples,Surveillance_signal_samples,Fs,[250000 250000]);
afmag3(afmag3>1 )= 1;
end
end
figure;
surf(delay3,doppler3,afmag3,'LineStyle','-.');
shading interp;
axis([-1e-5 1e-5 -2000 2000]);
grid on;
view([140,35]);
colorbar;
ylabel('Doppler (Hz)');
xlabel('Delay(s)');
title('Ambiguity Function Sref');
댓글 수: 5
dpb
2022년 7월 5일
30E6/1E3 ==> 30,000
What do you propose to do with 30K plots when you're done?
Miguel Albuquerque
2022년 7월 5일
dpb
2022년 7월 5일
I suspect you'll be exhausted long before you can even look at them all -- and the chance of seeing anything unique on one out of 30,000 is remote at best.
dpb
2022년 7월 5일
OK, I missed the 3000 step interval -- that's a big improvement although 1,000 is still stretching the limits of human endurance and likelihood of really catching anything...
Miguel Albuquerque
2022년 7월 5일
채택된 답변
추가 답변 (1개)
Sulaymon Eshkabilov
2022년 7월 5일
One of the possible solutions can be using cell array to define the indices, something like this way:
INDEX = {1:1000, 4000:5000, ...}
for ii = 1:10
for jj = INDEX(ii)
...
end
end
카테고리
도움말 센터 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!