I am trying to get rid off all of the values of the vector n=1:5000 that are smaller than number value 1000 and bigger than number 2000. This is my code, which of course is not working properly:
for k=1:length(MUPS) for s=1:length(MUPS{k}) if MUPS{k}(MUPS{k}<1000) & MUPS{k}(MUPS{k}>2000) MUPS{k}(s) = []; else MUPS{k}(s) = MUPS{k}(s); end end end
I need to use the remainings of the vector later on in the code. Could you tell me what am I doing wrong?
Best Answer