Cinditional if for array
조회 수: 6 (최근 30일)
이전 댓글 표시
I want to activate some function on two matrices (e.g. multiply them) depending on the condition that two matrices A & B are not empty. I tried the statement:
if A~=[] & B~=[]
C=A.*B
end
but I receive the error message:
Error using ~=
Matrix dimensions must agree.
How can I correct this?
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!