How to extract different values from the same array without duplicates?
Mostra commenti meno recenti
As a result of extracting using the datasample function from the state array with update information, all the same values were extracted.
I want to extract different update information.
....
for i = 1:1: user_num
% 3) delay update
state(i,3) = arrayfun(A, B); % (us),
% max_delay
max_t = max(state(i,3));
fprintf('max_t = %d\n', max_t );
% Returns 'i' observations uniformly randomly extracted from the delay index of the current cluster
i_station = datasample(state(i,3), 1); % Data of i-station in the same matrix
fprintf('i_station = %d\n', i_station);
j_station = datasample(state(i,3), 1); % Data of j-station in the same matrix
fprintf('j_station = %d\n', j_station);
% max| j_station - i_station|
at_t_delay = max(abs(j_station - i_station));
% delay 대소 비교에 따른 작업 조건
if (at_t_delay > max_t)
...
...
...
end
end
[Excuation result]
1 Commento
Rena Berman
il 6 Mag 2021
(Answers Dev) Restored edit
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Data Import and Analysis in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!