Find rows of matrix

Find rows of matrix - Boolian Test - 消息

#1 已发布: 2023/6/26 14:59:27
RegRetired

RegRetired

8个赞,共144个帖子。

组: 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 CurryLoveland, CO
#2 已发布: 2023/6/26 15:11:42
RegRetired

RegRetired

8个赞,共144个帖子。

组: User

Oops, I meant test expression, not text expression.
Reg CurryLoveland, CO
#3 已发布: 2023/6/26 17:24:48
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hi. This is an option.

MFind.sm (14.22 KiB)已下载 1545 次。
MFind.pdf (58.83 KiB)已下载 977 次。

Best regards.
Alvaro.
1位用户喜欢此帖子
NDTM Amarasekera 2023/6/27 07:38:00
#4 已发布: 2023/6/26 17:56:46
RegRetired

RegRetired

8个赞,共144个帖子。

组: User

Great! Thanks for all your help.
Reg CurryLoveland, CO
#5 已发布: 2023/6/27 12:13:11
NDTM Amarasekera

NDTM Amarasekera

130个赞,共352个帖子。

组: User

Another method

Array_Pos.sm (14.76 KiB)已下载 1457 次。

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

RegRetired

8个赞,共144个帖子。

组: 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 CurryLoveland, CO
#7 已发布: 2023/6/27 16:48:45
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: 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 已发布: 2023/6/27 17:41:12
RegRetired

RegRetired

8个赞,共144个帖子。

组: 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 CurryLoveland, CO
#9 已发布: 2023/6/27 18:16:02
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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 已发布: 2023/6/27 18:53:46
overlord

overlord

600个赞,共1,381个帖子。

组: 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.47 KiB)已下载 1531 次。

2023-02-27_01-50.png

Regards
#11 已发布: 2023/6/27 19:42:06
RegRetired

RegRetired

8个赞,共144个帖子。

组: User

Thanks. Very helpful!
Reg CurryLoveland, CO
  • 有新帖
  • 无新帖