Rows_Gathered_Count.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Rows_Gathered_Count.
Hi,
With intuition, I need help to write a function (in Mathcad 12) was briefly described as following:
In other words,
Thanks in advance.
-LL-
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Column 1 of the output is the number. Column 3 is the number of occurrences. What's column 2? Sometimes it seems to be the index of the first occurrence, sometimes the index of the second.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sorry, Richard. I forgot to generalize my question.
-LL-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Loi,
There is no consistency in your answers.
I assume "L" is being called because it sits adjacent to the last time 0.968 occurs - If this is the case why had 0.981 got the letter "F"next to it. Shouldn't it be "O"
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It's a neat answer. Thanks a lot. Sorry, I forgot to generalize my question, above.
-LL-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Don't worry. Generalization added. Also use first or last letter in the answer. In your picture, letter for 0.981 is "F" or "O"? Notice that the csort at the end is optional.
Regards. Alvaro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alvaro,
What Generalization? You shown two examples where the vaule 0.968 is returned with the letters "A" and "H", what does this mean?
Why not return "G"?
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Generalization in the sense that first attach take the index of the data (a column vector) and the second attach take the second column to return not the position but the "associated" letter.
Why not G? Because first routine take the associate first associate letter where the value appear and the second routine take the last letter.
Regards. Alvaro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Why not G? Because first routine take the associate first associate letter where the value appear and the second routine take the last letter.
Regards. Alvaro.
Fair enough, but Loi should have stated what he wants the program to return - Maybe he wants all the corresponding letters returned???
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
MIke Armstrong wrote:
Fair enough, but Loi should have stated what he wants the program to return - Maybe he wants all the corresponding letters returned???
Mike
You're right. All letters added, and the routine code is more clear reading the 3 possible answers.
Cheers. Alvaro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Nice piece of work - Gold star coming your way.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Gold star? ¡Ignorance vade retro! Illuminati triunf!:-). Thanks Mike.
Alvaro.
Message was edited by: AlvaroDíaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alvaro,
Would you be kind enough to explain how your program works?
I am pretty sure I know how you managed to get the array from the Match function, but not too sure how you managed to get the corresponding letters.
Cheers
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks again for all your help.
-LL-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Some kind of explanation added.
Regards. Alvaro.
Alvaro,
Cheers for taking the time to explain your method, much appreciated.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alvaro, your answer, the above, is very completely to my question. Thanks again for your time.
Regards,
-LL-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Loi Le wrote:
Alvaro, your answer, the above, is very completely to my question. Thanks again for your time.
Regards,
-LL-
Loi Le,
Alavro has done a fantastic job with the "RowsGatheredCount" function, defiantly one to file. You will notice that a lot off collabs will request similar requests to yours and the function can be changed easily.. The collection of the letters is the section I like .
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for the words, but the merit's isn't mine, is for the collab concept. One of the keys for the functions is the Stuart's set function, based on the not presented function IsIn (check http://communities.ptc.com/message/91270#91270, but there are others oldies entries).
The distinction between sets and lists came from the old maple structure: sets are defined by {a,b,c} and lists with [a,b,c] In the old versions (like those that use mathcad 13) is imperative use the correct definition for functions like solve, which take as an argument only sets, but not lists, returning an error in this case. Mathematically this is correct, but introduces a number of issues, like not repeated values, distortions in the "natural" sort, continous convertions between types to avoid errors, etc.
Regards. Alvaro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
AlvaroDíaz wrote:
Thanks for the words, but the merit's isn't mine, is for the collab concept. One of the keys for the functions is the Stuart's set function, based on the not presented function IsIn (check http://communities.ptc.com/message/91270#91270, but there are others oldies entries).
The distinction between sets and lists came from the old maple structure: sets are defined by {a,b,c} and lists with [a,b,c] In the old versions (like those that use mathcad 13) is imperative use the correct definition for functions like solve, which take as an argument only sets, but not lists, returning an error in this case. Mathematically this is correct, but introduces a number of issues, like not repeated values, distortions in the "natural" sort, continous convertions between types to avoid errors, etc.
Regards. Alvaro.
Alvaro,
Stuart also produced a similar function called "Setcount" which I posted. We don't see much of Stuart on here - shame.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alvaro, I was wondering that the "Lottery" title ( was mentioned by Mike before ) - Ought it to be refreshed here ? I also need help on that. Regards.-LL-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you look back through old posts you will see various methods of checking lottery numbers posted by collabs, - Search mike and lotter. If not, why not create a new thread as its not entirely clear exactly what your after.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
