syntax - matrix manipulation SciLab -


i heard there way change matrix values without using loop. example:

a = [1 2; 3 4] 

there suppose way can make values example less 4 , changed them other value, let's zero. this:

a(...<4...)=0 

and answer should be:

 ans  =  0.    0.   0.    4.  

anyone know syntax this?

you don't need use find this; can use indexing instead :

a(a>=4) = 0; 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -