Skip to main content
8-Gravel
July 26, 2024
Solved

Row Product in matrices

  • July 26, 2024
  • 2 replies
  • 10704 views

Hi, 

Can I get some help how to how to write a function that return all row products in a matrice according example below? 

 

Second question is how I extract data lower, between or higher then a given number.

 

PL_11061936_0-1721997374691.png

 

Best answer by terryhendicott

Hi

Like this

Capture.JPG

Cheers

Terry

2 replies

21-Topaz II
July 26, 2024

Hi

Like this

Capture.JPG

Cheers

Terry

8-Gravel
July 26, 2024

Ok, thank you so much for this!

 

I manage to add more columns to your function. But I don´t manage to add more rows? 

Help please 🙄

 

Best regards

Per

21-Topaz II
July 26, 2024

Hi,

How your function works on more rows is not easy to follow.  You need to provide an example of what happens with three columns and three rows?

Cheers

Terry

25-Diamond I
July 26, 2024

You are very unclear when it comes to describing what the function you ask for should actually do if the matrix has more than two rows.

So we can just poke in the dark ... 😞

 

Maybe this function is what you are looking for:

Werner_E_0-1722017708619.png

Werner_E_1-1722017772191.png

 

Its also not clear which way you would like to "extract" values within a certain range. I assume we are talking about filtering and trimming a vector.
You can make use of the built-in "lookup" function to do so:

Werner_E_1-1722019476669.png

 

Prime 10 worksheet attached

 

 

 

8-Gravel
July 26, 2024

Sorry If I am unclear. Probably because I thought I could grip how to build the function in general terms, and then for me to evolve it. Also it´s kind of hard to explain.

 

The base is a gambling game in Sweden (called "stryktipset") of thirteen soccer matches that can end with three different results. So we have a matrice of 3 colums and 13 rows. This can be just short of 1,6 miljon different rows, 3^13. A lot of rows!!

The game is to "guess" with some knowledge of how each and every game will end. A winn for the home team, a draw or a winn for the away team (1 X 2).

The value for every game is set on how people actually think the game will end. So if, for simplicity, all participants devides their bets 1/3 on game 1 the value for home winn, draw and away winn will be 33% each.

Soccer is a fun game since statistics don´t apply. Although I have created a theory, from statistics, that to be single winner of a game you shall have a inverted product of one row approx 20 miljoner. And you want to be alone with thirteen correct signs since the more that have all right the less you winn. 

So most people play the game thinking they know how the game will end, I want to try to play it using statistics (that don´t apply). 

I attach an Excel spreadsheet that might give you some clarity. It is of 256 rows. With Mathcad I would at the end like to sort out the rows, among the 1,6 miljon, that are in the region of a inverted product of 15-20 miljons. 

Do I in any way make my self clearer? 

25-Diamond I
July 26, 2024

Hmmm, actually I see no connection of your description of that bet game and your initial demand for a function which multiplies matrix rows with values found in other rows of the same matrix.

I was hoping for a more detailed description of the mathematical working of the function you are looking for and some specific examples (input matrix and expected output vector).

At least I thought you would look at the functions I posted and explain why it does not do what you expect.

 

Haven't looked at your Excel sheet but I rather would prefer a detailed verbal description of how the desired Prime function should work, i.e. what exactly this function is supposed to do.