Apparently you computed f_wb as a vector.
That’s fine. But it’s a little unusual to do that inside a for-loop.
If f_wb is a vector you can’t use an if-statement.
However, you can do a logical comparison against the whole vector. And then you don’t need the if-statement, or the for-loop.