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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Exclude some values

YA_10963798
12-Amethyst

Exclude some values

Hi there

I want to exclude some values from d when it is bigger than the width .... I want the program to just exclude the values that do not fulfil the condition, I used this program ,but it shows strange error ...I'm sure both of them have the same units 

YA_10963798_1-1730037766728.png

How to fix this ?

 

36 REPLIES 36
Werner_E
25-Diamond I
(To:Werner_E)

Maybe now we are back to the subject of this thread as i think that you not only want to delete some valued from the min-distance vector but you also would like to keep the corresponding point coordinates as well.

So I modified my "exclude" function to work on matrices. You have to provide the column index of the column you want the boolean function to be applied to.

Werner_E_0-1730228144506.png

Given that  matrix

Werner_E_1-1730228196306.png

and applying this boolean function

Werner_E_2-1730228243485.png

to column 6 ("distance"), we get

Werner_E_3-1730228285817.png

Werner_E_4-1730228315237.png

To get rid of the header we can modify the boolean function

Werner_E_5-1730228388689.png

Werner_E_6-1730228400721.png

Werner_E_8-1730228438663.png

Now you could plot all C-points (green) with a minimum distance to A greater or equal as width (45.3 m).

Werner_E_9-1730228554664.png

The reason for this undesired zoom chosen by the plot is that the origin is one of the C.points. I am not sure if this is as it should be.

Werner_E_10-1730228648614.png

So to get something more visually appealing we again have to manually change the axis limits

Werner_E_11-1730228711969.png

 

One thing I noticed is that the number of entries in your "result3" and in my "raw" differ significally!

Werner_E_12-1730229244655.png

This could mean that my way of calculating the minimum distance in getNearest might  be wrong?!?
You'll have to double check. I did not bother follow up to look where the vector d would come from, etc.

Your sheet definitely needs a heavy cleanup, I think.

 

EDIT: Just noticed that you uses <= in your boolean function while I used <. But this seems to have no effect anyway because there seems to be no min-distance of exactly 45.3 m.

 

 

 

 

Hi Werner, 

Thank you for your reply. 

I think the reason I get different numbers in (result3)  is because I changed the equation I wanted to spot the selected and you spot the excluded values >> both of them works for me . 

 

for the plot  is incredibly impressive and showed we are in the right track. 

However, why do you think my plot looks different than yours?

YA_10963798_0-1730267694953.png

YA_10963798_1-1730267753965.png

 

 

 

Werner_E
25-Diamond I
(To:YA_10963798)


@YA_10963798 wrote:

Hi Werner, 

Thank you for your reply. 

I think the reason I get different numbers in (result3)  is because I changed the equation I wanted to spot the selected and you spot the excluded values >> both of them works for me . 

 

for the plot  is incredibly impressive and showed we are in the right track. 

However, why do you think my plot looks different than yours?

 

 


Ahh! I did not see that the numbers I posted (1308 and 720) would perfectly add up to the total number of C-points (2028)! 🙂

You plot looks different because you forgot to set the Line Style to "none". That way Prime connects the points.

I already mentioned that the origin (0;0) is one of the C-points and it looks for me that this should not be that way. Thats the reason Prime scales the plot so that this point at the lower left is also part of it and therfore the main data is so tiny at the upper right.

I see .. Thank you I corrected that

Hi Werner, 

Actually what I need is to show in the plot  all the points and then color the ones we selected which there distance is less than 45.3m in different color. 

So it is easy for anyone to grab the idea that there is this amount of CPTs are exlculded from the plot rather go to check each single distance. 

 

in the new plot it is okay if we don't show the distance , but I need to show the one selected. So, let's say A points in blue, Exclued C points in red and the rest of point C in green. Is that possible?

Thanks @Werner_E 

 

Werner_E
25-Diamond I
(To:YA_10963798)


@YA_10963798 wrote:

Hi Werner, 

Actually what I need is to show in the plot  all the points and then color the ones we selected which there distance is less than 45.3m in different color. 

So it is easy for anyone to grab the idea that there is this amount of CPTs are exlculded from the plot rather go to check each single distance. 

 

in the new plot it is okay if we don't show the distance , but I need to show the one selected. So, let's say A points in blue, Exclued C points in red and the rest of point C in green. Is that possible?

Thanks @Werner_E 

 


Yes, and you actually already did in your plot.

After choosing a Symbol for each plot as you already did you simply have to change the line style to "none" so that only the points are plotted without connecting them.

And then color the second and the fourth plot in blue as these are the A-points corresponding to the plotted C-points.

That way only the 2028 A-points which correspond to one of the C-points are plotted.

If you need to plot all 3146 A-points, you simply delete the second and fourth trace and plot second column of A over first column of A as a third plot.

Your points are quite close to each other so in a plot which shows all of them the points will overlap.

One has to be careful concerning the order the traced are created. The last plot will overlap the others and I found no way to change that order (other than redoing the plot from anew).

 

As already written above, the data for C.CPT includes the origin (0;0). This is the reason why Prime choses the zoom in a way so that this point is included in the plot, resulting in the main data to be shown very tiny at the upper right.

As i thought that its not as intended that the origin is part of the c points, I investigated and found that the origin is part of the C data not once but even nine times at different rows.

Werner_E_0-1730288921829.png

In the attached sheet I got rid of these entries by using the trim command

Werner_E_1-1730288979046.png

You used absolute values when you used the submatrix command. As table2 would have a lower number of rows now, this command would fail. I changed it to be aware of the row number of table2.

Werner_E_2-1730289103578.png

Now that the origin is not part of the dataset anymore, Prime automatically chooses a more appropriate zoom and we don't have to manually 'zoom' by changing the axis limits

Werner_E_3-1730289351158.png

or that way

Werner_E_0-1730290472388.png

 

 

Prime 9 sheet attached

 

 

I just saw your reply. Thank you so much Werner. I wish I can send you a gift .. 

Yusra 

Announcements

Top Tags