1 Pages (15 items)
number of a row in an array - HELP How do you get the number of a row, of a matrix? - Messages
#1 Posted: 3/26/2021 11:40:35 PM
Hi guys
Do you know how to get the number of a row in an array?
ie I have a 5 * 2 array, I want to know what is the number of a particular row
¿Cómo se obtiene el número de una fila, de una matriz?
How do you get the number of a row, of a matrix?
I do not speak English, I hope you can understand me with the following image
[albumimg]1629[/albumimg]
Do you know how to get the number of a row in an array?
ie I have a 5 * 2 array, I want to know what is the number of a particular row
¿Cómo se obtiene el número de una fila, de una matriz?
How do you get the number of a row, of a matrix?
I do not speak English, I hope you can understand me with the following image
[albumimg]1629[/albumimg]
#3 Posted: 3/27/2021 7:32:48 AM
To find the indices of an array of values.
Cheers.....
Find_Row_Num.sm (95 KiB) downloaded 85 time(s).

Cheers.....
Find_Row_Num.sm (95 KiB) downloaded 85 time(s).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
3 users liked this post
#4 Posted: 3/27/2021 8:33:47 AM
WroteDo you know how to get the number of a row in an array?
These 4 are from a much larger compendium.
You will go a long route with them.
Jean
Utilities Matrix Truth Table [Locate row_col].sm (45 KiB) downloaded 67 time(s).
Utilities Matrix Locate Array1 Array2.sm (70 KiB) downloaded 64 time(s).
Utilities Matrix Truth Table [Locate row_col] COMPANION.sm (153 KiB) downloaded 68 time(s).
Utilities Matrix Treasury_1.sm (423 KiB) downloaded 62 time(s).
1 users liked this post
Erick Valentino 5/6/2021 7:32:00 AM
#5 Posted: 5/6/2021 7:35:13 AM
#6 Posted: 5/6/2021 8:21:02 AM
#7 Posted: 5/6/2021 9:49:36 AM
#8 Posted: 7/27/2023 4:04:49 PM
#9 Posted: 7/27/2023 10:14:46 PM
Wrotehey,
i have a some problem.
i hope someone can solve this problem too.
in the first exampe "match" its not working but in the second example it works. i dont know why
Hi Beyaz,
For first warning, row() expect a real pure number for second argument.
Your findrows() result is a number with N unit.
Due to your second problem;
I think commas in your subscripts makes the bug.
When they are deleted, your function match() works.
Regards
PS: Please provide your problematic file next time.
Rewriting your entire screenshot is cumbersome.
match.sm (10 KiB) downloaded 58 time(s).
#10 Posted: 7/28/2023 9:27:38 AM
More utilities were designed and available.
These 4 will go a long route ... projects.
Created Studio, sanity checked Solver 30405.
Utilities Matrix Locate Array1 Array2.sm (70 KiB) downloaded 60 time(s).
Utilities Matrix FindIndex DUAL COMPANION Copy.sm (108 KiB) downloaded 51 time(s).
Utilities Matrix FindIndexKey COMPANION QUICK Copy.sm (89 KiB) downloaded 50 time(s).
Utilities Matrix FindIndexKey COMPANION QUICK.sm (89 KiB) downloaded 50 time(s).
These 4 will go a long route ... projects.
Created Studio, sanity checked Solver 30405.
Utilities Matrix Locate Array1 Array2.sm (70 KiB) downloaded 60 time(s).
Utilities Matrix FindIndex DUAL COMPANION Copy.sm (108 KiB) downloaded 51 time(s).
Utilities Matrix FindIndexKey COMPANION QUICK Copy.sm (89 KiB) downloaded 50 time(s).
Utilities Matrix FindIndexKey COMPANION QUICK.sm (89 KiB) downloaded 50 time(s).
#11 Posted: 7/28/2023 4:32:39 PM
WroteWrotehey,
i have a some problem.
i hope someone can solve this problem too.
in the first exampe "match" its not working but in the second example it works. i dont know why
Hi Beyaz,
For first warning, row() expect a real pure number for second argument.
Your findrows() result is a number with N unit.
Due to your second problem;
I think commas in your subscripts makes the bug.
When they are deleted, your function match() works.
Regards
PS: Please provide your problematic file next time.
Rewriting your entire screenshot is cumbersome.
match.sm (10 KiB) downloaded 58 time(s).
thanks overlord
sorry, you are right, next time i will add the file.
i tried it but it doesnt work. this time i add the file.
vogt.sm (636 KiB) downloaded 52 time(s).
//I solved it like this
#12 Posted: 7/28/2023 5:03:03 PM
#13 Posted: 7/29/2023 8:22:05 AM
Attach an image of a typical 6 x 4 matrix 4 decimals.
From there, say what you want to extract.
That will ease the guidance, while avoiding confusion.
From there, say what you want to extract.
That will ease the guidance, while avoiding confusion.
#14 Posted: 1/5/2024 4:37:40 PM
#15 Posted: 1/6/2024 3:48:08 AM
The result of findrows() is a matrix, even if there is only one match (exept for no matches, then the result is the number zero)
Converting it to a scalar, seems to help. The same could be applied to the overall result to remove the matrix.
Yet, there is a shorter way to get the index. This, however, won't work for multiple matches.
File not found.File not found.
Converting it to a scalar, seems to help. The same could be applied to the overall result to remove the matrix.
Yet, there is a shorter way to get the index. This, however, won't work for multiple matches.
File not found.File not found.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 Pages (15 items)
-
New Posts
-
No New Posts