01-19-2010 02:13 PM - edited 01-19-2010 02:15 PM
Hi all,
I have two array with different size,
Array 1 Array 2
1 0
1 0
1 0
1
If compound arithmetic OR was performed on them, I got output
1
1
1
Is there any way I can get
1
1
1
1
Thank you.
Solved! Go to Solution.
01-19-2010 02:52 PM
01-19-2010 02:59 PM
01-19-2010 04:41 PM
Thank you for the ideas!
Array 2 is the output of some program, its size varies from 0 to hundred...
array 1 size is also variable, from 0 to 5...
so I am thinking somehow can I pad 0s after the smaller size array to make the sizes of them equal?
01-19-2010 05:19 PM
01-19-2010 05:51 PM - edited 01-19-2010 05:52 PM
Padding is most easily done using "reshape array". Here's some minimal code that pads the shorter array to the size of the longer one of the two.