No sir, It is not.
I can pass it via for loop but I don't want to take that approach.
Kindly let me know
as before, please post after the quoted reply, not before it. it makes it easier for readers to follow the conversation.
I assume you didn't actually mean 'randomly', but you are looking for all of the combinations.
What you are doing looks like the generation of a 2d coordinate mesh, given vectors A and B. You can use the meshgrid function to make all of those combinations.
>> A = 1:0.2:2;B = 10:0.2:11;[aa, bb] = meshgrid (A,B)
aa =
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
bb =
10.000 10.000 10.000 10.000 10.000 10.000
10.200 10.200 10.200 10.200 10.200 10.200
10.400 10.400 10.400 10.400 10.400 10.400
10.600 10.600 10.600 10.600 10.600 10.600
10.800 10.800 10.800 10.800 10.800 10.800
11.000 11.000 11.000 11.000 11.000 11.000
Now, the positions of aa and bb give you every combination of A, B.
if you want this reshaped as a single array, you could use:
>> C = [aa(:), bb(:)]
C =
1.0000 10.0000
1.0000 10.2000
1.0000 10.4000
1.0000 10.6000
1.0000 10.8000
1.0000 11.0000
1.2000 10.0000
1.2000 10.2000
1.2000 10.4000
1.2000 10.6000
1.2000 10.8000
1.2000 11.0000
1.4000 10.0000
1.4000 10.2000
1.4000 10.4000
1.4000 10.6000
1.4000 10.8000
1.4000 11.0000
1.6000 10.0000
1.6000 10.2000
1.6000 10.4000
1.6000 10.6000
1.6000 10.8000
1.6000 11.0000
1.8000 10.0000
1.8000 10.2000
1.8000 10.4000
1.8000 10.6000
1.8000 10.8000
1.8000 11.0000
2.0000 10.0000
2.0000 10.2000
2.0000 10.4000
2.0000 10.6000
2.0000 10.8000
2.0000 11.0000
Or however else you want to manipulate the array to make it useful for you.