Skip to main content
14-Alexandrite
March 2, 2024
Solved

find value from matrix

  • March 2, 2024
  • 2 replies
  • 5871 views

need to find q1 which is basically the values of qcza( known variable) qcza is the resistance in known depth [z]. 

q1 is equal to qcza when the depth is between 0.7D<z< 4D when D=0.4 and it has always to choose the minimum value until there is smaller value. the file is attached

2024-03-02 (2).png

Best answer by Werner_E

So lets see if this next try comes closer to what you have in mind ...

Werner_E_0-1709388535593.png

Prime 9 file attached

 

2 replies

25-Diamond I
March 2, 2024

Its not perfectly clear to me what you are looking for.

As I understood:

1) Input value is a length D (in your example 0.4 m)

2) a range is calculated running from 0.7*D up to 4*D (in your example 0.28 m up to 1,6 m)

3) We look up all the q-values corrsponding to the range calculated in #2 and select the smallest of them

In your example the output would be 2.22 MPa (which by chance happens to be at the upper end of the interval. Is this correct?

Or should we chose the q-value corresponding to the smallest z-value (-> 5.721 MPa, first value in interval)?

OR ...?

BTW, your data looks a bit ... erratic, doesn't it?

Werner_E_3-1709380726047.pngWerner_E_4-1709380735448.png

 

Here is how I would implement the algorithm described above - as a function with D as input and the q-value as output.

Werner_E_0-1709383316588.png

Prime 9 worksheet attached

 

14-Alexandrite
March 2, 2024
The input values are z and qcza
Where z is the depth and qcza is the resistance in each z depth … for example at depth z= 0.2 m the resistance is qcza=3.995 MPa
d = 0.38 m ..0.7d=0.2 m and 4d = 1.4 m
 
Now q1 is equal to qcza when z is between (0.2<z<1.4) 
 
 
I need to write a program showing the values of q1 as a range 
Considering that q1 should be always small when going deeper .
For example if qcza is equal to = 7 /8 /6/7/9 
The program should choose q1 as q1= 7/ 7/6/ 6 
Always goes with the smaller number 
I hope you get it 
25-Diamond I
March 2, 2024

@YA_10963798 wrote:
The input values are z and qcza

No! z and qcza are the data vectors for length and pressure (you call it depth and resistance, but I don't care about the meaning of the data).

The input seems to be a single length/depth Db. You provided 0.4 m as an example

Its still not clear what the output, the result, should be. I assumed it to be a single pressure value (as described above) but I can't be sure. You did not answer my question if the result of the input value D.b=0,4m really should be 2,22 MPa. If not, what else should the result be and why?

 


Now q1 is equal to qcza when z is between (0.2<z<1.4) 
 

q1? q1 is the desired result, the output. But how could q1 be equal to qcza??? qcza is a vector with 1339 entries!

 


I need to write a program showing the values of q1 as a range 
Considering that q1 should be always small when going deeper .
For example if qcza is equal to = 7 /8 /6/7/9 
The program should choose q1 as q1= 7/ 7/6/ 6 
Always goes with the smaller number 
I hope you get it 

The leaves me clueless, sorry!

ttokoro
21-Topaz I
21-Topaz I
March 2, 2024

image.png

t.t.
ttokoro
21-Topaz I
21-Topaz I
March 3, 2024

image.png

t.t.