jeudi 6 juillet 2017

How to replace values in specific lines and on determined conditions

I'm in trouble: I have a dataset with 128597 lines and 10 columns. I need to change the values from column 10 between line 10276 until 128597.

And this change have to respect some conditions, like: If the value is between 11 and 33, the value will become 1 If the value is between 34 and 56, the value will become 5 And go on...

I tried the code below, but didn't work:

m(10276:128597,10) > 11 & m(10276:128597,10)< 33=1;

Can anyone help me please!!! :)

Aucun commentaire:

Enregistrer un commentaire