I'm working on a function that runs through an array and elements outside a certain threshold become NaN. Although I can't get the elements above/below the threshold to be omitted (NaN).
function [p] = filtering(fc,thresh1,thresh2)p = fc;% Set threshold
for i = 1:fc if fc >=thresh2 p = NaN; elseif fc <= thresh1 p = NaN; else continue endend end
Thanks in advance!!
Best Answer