Matlab: How do I use a logical matrix in a if statement? -


i have logical matrix

logicmatrix = [ 0 0 0                 1 1 1                 0 0 1                 1 0 1                 0 0 0                 0 0 0                 0 1 0                 0 0 0] 

i need if statement check , each row 1. (any column, multiple columns, or columns; if row has 1 if statement gets run through)

i used while matrix vector had increase size of columns , doesn't work

if logicmatrix(rowindex) == 1 

the answer found works this. help.

if any(logicmatrix(rowindex,:)) == 1 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -