I am writing a script to prove Monty Hall paradox in MATLAB and I have a problem -
I do not know how to make MATLAB generated a random number between 1 and 3 that is different from the previous two.

Here is my script:

```
% This program demostrates the Monty Hall paradox.
% A_pick1 represents where person chooses to put the five-pound note
% B_pick1 represents which box person B  first identifies
% A_pick2 represents the box that person A opens up - it must be different
% than both A_pick1 and B_pick2

A_pick1 = round(3 * rand(1) + 0.5)
B_pick1 = round(3 * rand(1) + 0.5)
A_pick2 = round(3* rand(1) + 0.5);
while (A_pick2 == A_pick1 || A_pick2 == B_pick1)
   A_pick2 = rand(3 * rand(1) + 0.5) ~= (A_pick1 && B_pick1)
    break
end

```

I am not sure how to use the while loop properly.

Thanks in advance