Elements in array and matrix
2 views (last 30 days)
Show older comments
how would you detect duplicated user inputs in arrays? and how to use unique?
0 Comments
Answers (2)
Image Analyst
on 4 Apr 2020
Hint: call input() or inputdlg() to get the numbers, and unique() inside a while statement to check for validity
while length(numbers) ~= length(unique(numbers)) && sum(numbers > 0) ~= 5
1 Comment
Image Analyst
on 4 Apr 2020
Is this homework that you have to turn in? Are you allowed to turn in my work as your own?
See Also
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!