Find rows of matrix

Find rows of matrix - Boolian Test - Messages

#1 Posted: 6/26/2023 2:59:27 PM
RegRetired

RegRetired

8 likes in 130 posts.

Group: User

How do I find all rows of a matrix M where column n contains all numbers ≤ x.

I cannot figure out how to use findrows for this. If my text expression is max(M) it works fine, but
the ≤ test does not work for me.

An example would be much appreciated.
Reg Curry Loveland, CO
#2 Posted: 6/26/2023 3:11:42 PM
RegRetired

RegRetired

8 likes in 130 posts.

Group: User

Oops, I meant test expression, not text expression.
Reg Curry Loveland, CO
#3 Posted: 6/26/2023 5:24:48 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. This is an option.

MFind.sm (14 KiB) downloaded 59 time(s).
MFind.pdf (58 KiB) downloaded 75 time(s).

Best regards.
Alvaro.
1 users liked this post
NDTM Amarasekera 6/27/2023 7:38:00 AM
#4 Posted: 6/26/2023 5:56:46 PM
RegRetired

RegRetired

8 likes in 130 posts.

Group: User

Great! Thanks for all your help.
Reg Curry Loveland, CO
#5 Posted: 6/27/2023 12:13:11 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Another method

Array_Pos.sm (14 KiB) downloaded 38 time(s).

Array_Pos.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#6 Posted: 6/27/2023 2:51:06 PM
RegRetired

RegRetired

8 likes in 130 posts.

Group: User

Ndtma,
Thanks; however, I don’t understand the large numbers in your answer, which are greater than the size of the matrix.

Sorry for my lack of understanding.
Reg Curry Loveland, CO
#7 Posted: 6/27/2023 4:48:45 PM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Wrote

Ndtma,
Thanks; however, I don’t understand the large numbers in your answer, which are greater than the size of the matrix.

Sorry for my lack of understanding.



It's the item position by linear indexing. Elements can be accessed using a single index, that is the position sorted by rows (base 1). f.e. The 2nd element in the 3rd row is indexed (3-1)*cols(matrix)+2
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#8 Posted: 6/27/2023 5:41:12 PM
RegRetired

RegRetired

8 likes in 130 posts.

Group: User

Okay, thanks. More complicated than I was looking for. My matrix is 2000x2. But, the responses gave me a clue on how to write my own that is similar to the MATHCAD match function.

Because PTC no longer supports MATHCAD 15 and the future of getting a new license if my computer fails is in question, SMATH is a lifesaver. I am gradually converting my important files to SMATH. SMATH is a real service and excellent option for those in my situation.

I am gradually becoming accustomed to SMATH. I do have one more question on plots. If I click in an XY plot to change some formatting and I accidentally hit my mouse wheel, the plot changes the zoom level. It’s not obvious how to return to the original view. If I close the file and reopen, it is back to normal. At first I thought this was a bug, but searching the forum, I see it is a feature. Is there a simple way to return to the original view when I accidentally move my mouse wheel.

Thanks again.
Reg Curry Loveland, CO
#9 Posted: 6/27/2023 6:16:02 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I am gradually becoming accustomed to SMATH.I do have one more question on plots.If I click in an XY plot to change some formatting and I accidentally hit my mouse wheel, the plot changes the zoom level.It’s not obvious how to return to the original view.If I close the file and reopen, it is back to normal.At first I thought this was a bug, but searching the forum, I see it is a feature.Is there a simple way to return to the original view when I accidentally move my mouse wheel.


I mentioned that before, about your spoiled X_Y plot
f(x), data ... quick plot is insensitive to command wrt the graph plot.
Differently the X_Y plot will scrap the limits if you slide the graph.
Never put the mouse in the X_Y plot. Resize [X,Y] from the system.
#10 Posted: 6/27/2023 6:53:46 PM
overlord

overlord

547 likes in 1332 posts.

Group: Moderator

Wrote

Is there a simple way to return to the original view when I accidentally move my mouse wheel.

Thanks again.


You can try to learn setprop() function for X-Y Plot.
https://en.smath.com/forum/yaf_postst1774_X-Y-Plot-Region.aspx
https://en.smath.com/forum/yaf_postsm59088_X-Y-Plot-Region.aspx#post59088

Here is a simple demonstration I posted before.
DPT_NV plot.sm (20 KiB) downloaded 41 time(s).

2023-02-27_01-50.png

Regards
#11 Posted: 6/27/2023 7:42:06 PM
RegRetired

RegRetired

8 likes in 130 posts.

Group: User

Thanks. Very helpful!
Reg Curry Loveland, CO
  • New Posts New Posts
  • No New Posts No New Posts