Cinditional if for array
4 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!