A vector v is supposed to store unique random numbers. Use set functions to determine whether or not this is true
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:14| Question number:11.14
All Answers
total answers (1)
>> v = randi([1 5], 1,8)
v =
4 3 3 2 4 1 4 1
>> isequal(v, unique(v))
ans =
0
>> v = 1:8;
>> isequal(v, unique(v))
ans =
1
need an explanation for this answer? contact us directly to get an explanation for this answer