make a script that will randomly choose 3 values ofparameter l from interval [1,6] in matlab

To randomly choose 3 values of a parameter l from the interval [1,6] in MATLAB, you can use the randi function:

main.m
l = randi([1,6], 1, 3)
23 chars
2 lines

This will generate a row vector with 3 elements, where each element is a random integer between 1 and 6 inclusive.

You can also use the randperm function to generate a random permutation of the numbers 1 to 6, and then take the first 3 elements:

main.m
perm = randperm(6);
l = perm(1:3);
35 chars
3 lines

This will generate a row vector perm with a random permutation of the numbers 1 to 6, and then l will be a new row vector containing the first 3 elements of perm.

gistlibby LogSnag