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!