Discussion of article "Matrix and Vector operations in MQL5" - page 4

 
Aleksey Vyazmikin find the maximum value in a certain column in this array, so I'm going to look at the instructions.

And how am I supposed to understand 3 and 4 digits in the coordinates when there should be only two????

And, how do I get the maximum value of a given column in the end?

It's a bug/bug apparently))))) Copy-pasted not successfully.

 
Aleksey Vyazmikin find the maximum value in a certain column in this array, so I'm going to look at the instructions.

And how am I supposed to understand 3 and 4 digits in the coordinates when there should be only two????

And, how do I get the maximum value of a given column in the end?

The help is written in Russian. You should first describe your task step by step so that you can understand it yourself. Why are you looking for an index? You can see that for a matrix this function will return a vector


Thus, you need:

  1. take a column or row of a matrix
  2. find the maximum value in this sequence

Go through all the examples step by step to understand how to work with a matrix.

Manipulations
Документация по MQL5: Методы матриц и векторов / Манипуляции
Документация по MQL5: Методы матриц и векторов / Манипуляции
  • www.mql5.com
Манипуляции - Методы матриц и векторов - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Valeriy Yastremskiy #:

A bug/bug apparently)))))) Copypaste was not successful.

No one reads it, but they are ready to support it. I thought I saw you in the machine learning thread? If so, you should understand what is written in the article.

 
Aleksey Vyazmikin #:
How to copy a specific column/row of a matrix into a vector or array?

Read the help and the article, there is no other option.

 
Aleksey Vyazmikin #:

Essence - write code - fill matrix - print matrix totals - run script - comment matrix filling - run script - print matrix with old values.

Cache? You don't want a cache, initialise the values explicitly

 
Rashid Umarov #:

The help is written in Russian. You should first describe your task step by step so that you can understand it yourself. Why are you looking for an index? You can see that for a matrix this function will return a vector


So what you need to do is:

  1. take a column or row of the matrix
  2. find the maximum value in this sequence

Go through all the examples step by step to understand how to work with a matrix.

Manipulations

It seems obvious that if I'm asking questions, the instructions are not written clearly, the words should make sense - read "Returns the index of the maximum value" and you write " for a matrix this function will return a vector".

Right, I need to take a column or row - but how to do that I can't figure out from the instructions.

Read:

Col

Returns a column vector. Writes the vector to the specified column


Well great, that's what I need to get the column from the matrix into a vector.

vectorf V_Stolb.Col(m_Quant,1);
'Col' is not a member of 'vectorf' type Primer_01.mq5   164     9
expression has no effect        Primer_01.mq5   164     1
1 errors, 1 warnings            2       2

I want to find the maximum value in a column or row of the matrix, not the whole matrix.
Документация по MQL5: Методы матриц и векторов / Манипуляции / Col
Документация по MQL5: Методы матриц и векторов / Манипуляции / Col
  • www.mql5.com
Col - Манипуляции - Методы матриц и векторов - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Rashid Umarov #:

Cache? If you don't want cache, initialise the values explicitly

Got it, I'll initialise with values.....

 
It's either clear to everyone and no one has any questions and I'm completely weak-minded, or people are waiting for more examples and then answering my stupid questions develops people.
 
Aleksey Vyazmikin #:

Col

Returns a column vector. Writes a vector to the specified column


Well great, that's what I need to get the column from the matrix into a vector.


I want to find the maximum value in a column or row of the matrix, not the whole matrix.

So why are you trying to get a vector from a vector. These methods are designed to get or insert a vector into a matrix. And the compiler tells you that


 
Rashid Umarov #:

So why are you trying to get a vector from a vector. These methods are designed to get or insert a vector into a matrix. And the compiler tells you that


It's not a vector, it's a matrix, I have the code above.

   matrixf m_Quant;//Matrix with quantum table
   m_Quant.Init(Strok_Total_Quant*2, 1);//Initialise the matrix
   vectorf V_Quant;//Vector for array to matrix transfer
   V_Quant.Assign(arr_Quant);//Copy the array into a vector
//Print("data after Assign", m_Quant);
   m_Quant.Col(V_Quant,0);//Copy a vector into a matrix
   m_Quant.Reshape(Strok_Total_Quant, 2);//Improve the matrix proportion along with the data