If I understand correctly what you are doing, and if ‘FxRMS’ is a vector, you can completely eliminate the loop and do your test in one line:
FxLogic = (FxRMS > LowerFxThresh) & (FxRMS < UpperFxThresh);
This sets ‘FxLogic’ to logical 1 or true for ‘FxRMS’ within the limits, and 0 elsewhere. Logical arrays become numeric arrays by doing any operation on them, for example putting a ‘+’ in front of it:
FxLogic = +((FxRMS > LowerFxThresh) & (FxRMS < UpperFxThresh));
producing a double vector.
This should work.