` for i=1:pfor j=1:pi~=jdisp('i is equal to');disp(i);disp('j is equal to');disp(j);endend`

I have made this however some pairs are the same e.g i= 1 j = 1 and so on

Skip to content# MATLAB: I want to create a for loop which creates different pairs each time.

for loop

` for i=1:pfor j=1:pi~=jdisp('i is equal to');disp(i);disp('j is equal to');disp(j);endend`

I have made this however some pairs are the same e.g i= 1 j = 1 and so on

## Best Answer