Elements in array and matrix
显示 更早的评论
how would you detect duplicated user inputs in arrays? and how to use unique?
回答(2 个)
Image Analyst
2020-4-4
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 个评论
Image Analyst
2020-4-4
Is this homework that you have to turn in? Are you allowed to turn in my work as your own?
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!