Info
此问题已关闭。 请重新打开它进行编辑或回答。
Calling unique rows in vectors
1 次查看(过去 30 天)
显示 更早的评论
I have 2 row vectors
Remainder = 50 10 30 20 60 40 50 10
Quotient = 1 7 1 4 2 8 5 7 1 4 2 8 5
How would I produce something to show the repeating and non repeating parts in the Quotient. say x= the non repeating parts and y=the repeating parts. So we would have x=[1] y=[7 1 4 2 8 5].
Another example say you have Quotient=[5 0 0] and the Remainder =[0 0 0] I would like to output x=5 and y=0
I think we should use the Remainder to show this because that when it shows what repeating so when the remainders are both 50 that is the repeating part of the quotient. Is it possible to create a code that works for all Quotients and Remainders. Thank you for the help
2 个评论
Image Analyst
2015-10-23
Please explain. x appears 3 times (repeats itself twice) in Quotient. Why do you say it's non-repeating? Is it in a stetch of numbers that is too short? Do you have a minimum length of numbers that you want to check for?
If you want to "show the repeating and non repeating parts in the Quotient" then why do you care about the Remainder at all? Why is the Remainder vector needed at all to find the repeats in the second vector.
What would be your answer for this:
Quotient = [1 7 1 4 2 8 5 7 1 4 7 1 4 2 8 5 1 7]
714 is in there 3 times, 17 is in there twice, 14 is in there 3 times, 714285 is in there twice, etc.
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!