Advertisement
deushiro

Untitled

Mar 8th, 2021
810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.33 KB | None | 0 0
  1. a = [2 3 4];
  2. b = [3 5 2];
  3. c = [1 1 1];
  4.  
  5. aplusb = a + b;
  6. bplusa = b + a;
  7. is_equal = (aplusb == bplusa)
  8. is_equal_using_isequal = isequal(aplusb,bplusa)
  9.  
  10. aplusbandthenplusc = (a + b) + c;
  11. aplusbplusc = a + (b + c);
  12. is_equal = (aplusbandthenplusc == aplusbplusc)
  13. is_equal_using_isequal = isequal(aplusbplusc, aplusbandthenplusc)
  14.  
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement