cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Limit values

YA_10963798
14-Alexandrite

Limit values

YA_10963798_1-1713783590514.png

I  want the values of qcsand to be only between 5 and 25 

I how to fix that 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:YA_10963798)

So what should happen with the values in q which are outside the limits?

Do want to set them to the lowest or hightest value allowed or do you rather want to delete them from the vector?

From the attempt you posted I looks like you want to delete those values.

One way to achieve this is

Werner_E_0-1713786591662.png

 

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:YA_10963798)

So what should happen with the values in q which are outside the limits?

Do want to set them to the lowest or hightest value allowed or do you rather want to delete them from the vector?

From the attempt you posted I looks like you want to delete those values.

One way to achieve this is

Werner_E_0-1713786591662.png

 

YA_10963798
14-Alexandrite
(To:Werner_E)

I want to delete the values outside the limits 

Thanks a lot 

YA_10963798
14-Alexandrite
(To:Werner_E)

Can you help with this one as well 

I want d to start from the values that are not zero where the sand layer starts , I want to eliminate all the values which are equal to zero

d is the depth of the qc

YA_10963798_0-1713787680479.png

 

Werner_E
25-Diamond I
(To:YA_10963798)

Aren't you trying to do the very same thing as we already have done before - eliminating all values which are not within the range from 5 MPa to 25 MPa ???

Ahh, I see - this time you are trying to get a vector of the corresponding d-values instead!

 

We you could use a slightly modified version of the function above to do the job. Not sure if its a good idea to use the same name for both functions, though.

Werner_E_0-1713788597956.png

I renamed your approach which replaced the anwanted values by zeros to Sand_layers_old and showed how you can trim the zeros from the output of your function.

Yet even another way to do the job is

Werner_E_1-1713788800258.png

 

 

 

YA_10963798
14-Alexandrite
(To:Werner_E)

Yes exactly, 

Thank you 

Announcements

Top Tags