Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi there,
I have a variable with 100 values inside and I want to check every 5 values to find the minimum between them. I need to do that through the entire values ... this means 20 times . I tried to write it this way but not working :
z , and q are related to each other . q is the resistance at z depth ..
the results I expect is : the program will check q at each z and will choose the minimum (q , 15MPa) but will do this in intervals 5 values by 5 values .
the sheet can't be attached again . I attached zip file
thanks
Yusra
Solved! Go to Solution.
Here are two implementations of how I understood your question.
The first uses the "submatrix" function to get the minimum of the five values, the second uses a nested for-loop.
Prime 11 sheet attached
Hi Yusra,
Try this:
You should be able to call it with:
But you'll also need an associated Z array:
Now you can plot Q versus Z.
Success!
Luc
Hi Luc
in Z array why you used (i-1)*5+3
Thanks
Here are two implementations of how I understood your question.
The first uses the "submatrix" function to get the minimum of the five values, the second uses a nested for-loop.
Prime 11 sheet attached
there is one remark here .. the result should be 100 values not 20 values only..... I wanted to compare one by one in each 5 values
which means we divide the 100 values to 20 groups in each group 5 values > and then compare each member to 15 and choose the minimum...
The end results will still be 20 groups but with the minimum values.
