Hi everyone,
I have data that is organized in structures which look like this:
rating.pretest.s1rating.pretest.s2...
and in those structures on the last level (s1, s2…) I have numbers or NaN where a participant failed to push a button in time. Since this counts as a wrong answer I would like to assign all the NaNs the number 1. What I tried is
rating(isnan(rating)) = 1
but I got the error message Undefined function "isnan" for input arguments of type "struct". I have read some answers on similar questions but none of them seemed applicable since I'm using a structure (or were too complicated for me to understand since I'm still a beginner). Is there an alternative I could use? Thank you in advance!
Best Answer