Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [2 3 4];
- b = [3 5 2];
- c = [1 1 1];
- aplusb = a + b;
- bplusa = b + a;
- is_equal = (aplusb == bplusa)
- is_equal_using_isequal = isequal(aplusb,bplusa)
- figure
- grid on
- quiver3(0, 0,0, 2, 3,4, 1)
- hold on
- axis equal
- quiver3(0, 0,0, 3, 5,2)
- quiver3(0, 0,0, aplusb(1), aplusb(2), aplusb(3))
- aplusbandthenplusc = (a + b) + c;
- aplusbplusc = a + (b + c);
- is_equal = (aplusbandthenplusc == aplusbplusc)
- is_equal_using_isequal = isequal(aplusbplusc, aplusbandthenplusc)
- figure
- grid on
- quiver3(0, 0,0, 2, 3,4, 1)
- hold on
- axis equal
- quiver3(0, 0,0, 3, 5,2)
- quiver3(0,0,0,c(1),c(2),c(3))
- quiver3(0, 0,0, aplusbplusc(1), aplusbplusc(2), aplusbplusc(3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement