Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have two arrays in Matlab say A = [1 4 89 2 67 247 2] B = [0 1 1 1 0 0 1]
I want an array C, which contains elements from array A, if there is 1 in B at the corresponding index. In this case, C = [4 89 2 2].
How to do this?
論理インデックスを使用する:
>> C = A(logical(B)) C = 4 89 2 2
このコードでは、
<p:galleria value="#{Bean.images}" var="image" panelWidth="500" panelHeight="313" showCaption="true" <p:graphicImage value="/images/galleria/#{image}" alt="Image Description