Weird Behavior Of Replacing Data Array In a Certain Range ...
Show older comments
Hi, Community
I want to ask about how to delete array data with a certain range. So i have this code below :
the_noising_gauss_ori = vertcat(transpose(noising_gauss_ori)); %Other related variable was sucessfully linked
mov_remove_gauss_ori_pos = the_noising_gauss_ori >= 2; %Other related variable was sucessfully linked
mov_remove_gauss_ori_neg = the_noising_gauss_ori <= -2; %Other related variable was sucessfully linked
detecting_noise_pos = the_noising_gauss_ori < 2; %Other related variable was sucessfully linked
detecting_noise_neg = the_noising_gauss_ori > -2; %Other related variable was sucessfully linked
gaussian_filter = imgaussian(graph_gauss_ori, zigm, [l_wak 1]); %Other related variable was sucessfully linked
if ~isempty(mov_remove_gauss_ori_neg) || ~isempty(mov_remove_gauss_ori_neg)
the_original_sinyal2(detecting_noise_pos) = nan;
the_original_sinyal2(detecting_noise_neg) = nan;
the_original_sinyal1(mov_remove_gauss_ori_pos) = gaussian_filter(mov_remove_gauss_ori_pos);
the_original_sinyal1(mov_remove_gauss_ori_neg) = gaussian_filter(mov_remove_gauss_ori_neg);
end
When i run that code, the variable array of the_original_sinyal1(mov_remove_gauss_ori_pos) and the_original_sinyal1(mov_remove_gauss_ori_neg) is good, it can be replaced with its relative data from gaussian_filter(mov_remove_gauss_ori_pos) and gaussian_filter(mov_remove_gauss_ori_neg).... How ever, the variable array of the_original_sinyal2(detecting_noise_pos) and the_original_sinyal2(detecting_noise_neg) cannot filter the data with that range (the_noising_gauss_ori < 2 or the_noising_gauss_ori > -2) and just shown as NaN data for all of the_original_sinyal2 variable....
How to fix my problem, anyone. I just want to replace the_original_sinyal2 variable with a same rows as the_noising_gauss_ori < 2 or the_noising_gauss_ori > -2 as NaN.... Thank you very much...
Accepted Answer
More Answers (0)
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!