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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Limit values

YA_10963798
8-Gravel

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 

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

 

I want to delete the values outside the limits 

Thanks a lot 

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

 

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

 

 

 

Yes exactly, 

Thank you 

Top Tags