I have a 1 x 3 matrix (DMS).
Values are [26, 50, 60]
Code is:
if DMS(1,3) == 60 DMS (1,2) = DMS (1,2) + 1 & DMS(1,3) == 0 else end
The purpose is to roll over (add 1) to the second elements value and set the third elements value to 0.
During runtime I am getting a value of [26, 0, 60].
What is wrong with my coding of the if statement for the desired values to be returned?
Best Answer