XOR between two 3d arrays: array1>=250 xor array2>=170
조회 수: 1 (최근 30일)
이전 댓글 표시
I have two 3d arrays sized 40*60*157800. I want to count number of values with array1>=250 xor array2>=170. I want to do this for each of the 40x60 values. This will give me a 2d array of 40*60*1. I have tried this code which is not working:
sum(myarray1>=10.5 xor myarray2>=50,3);
댓글 수: 0
채택된 답변
James Tursa
2018년 6월 6일
편집: James Tursa
2018년 6월 6일
You almost had the syntax correct. E.g.,
sum(xor(myarray1>=10.5,myarray2>=50),3)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!