MATLAB: Avoiding same data in looping

Hii… I am a very new MATLAB user, I want to ask how to avoid same data when I do random looping, Example, I have A = [ x y z], I want to do looping, but every value does not have same value, ex: if I have data from 1 to 3, if x=1, y and z should not be 1 (should be 2 or 3). How to make the m-file?
Thank You

Best Answer

  • For A=1:3
    fprintf('The value of A is: %d\n',A);