Programming check: Point in Circle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Programming check: Point in Circle
I'm trying to get a programmed text output from testing if a point is inside a circle. All of the points are either secondary ohms or degrees. The chuck of programming seems to fail if there are units attached to the numbers. See Below.
Solved! Go to Solution.
- Labels:
-
Electrical_Engineering
- Tags:
- Mho circle impedance
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you! That worked.
I attached the file along with the screen shot in the first, original post. This site must have deleted the program file. File attached now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
All of the points are either secondary ohms or degrees.
?????
See Below.
Nothing to see !?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Werner,
Because maybe the units of Secondary Impedance and degrees, the chunk of programming to decide if a point is inside or outside a circle fails. See attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Its hard to debug a picture - especially as you don't show the variables you use when calling the function and you don't show the error message which is thrown ...
Always attach the file (stripped down to the essentials) if ever possible and not just a picture!
Best guess i that the 10^-10 must be assigned the very same unit as the other variables!
If you don't need to know if a point is (approximately) at the circumfence of the circle, you can omit that part and simple distinguish between <= (inside) and > (outside).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you! That worked.
I attached the file along with the screen shot in the first, original post. This site must have deleted the program file. File attached now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Deleate NaN NaN if you add ohm unit for the other data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm a new user. How should I apply the above?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ttokoro wrote:
Deleate NaN NaN if you add ohm unit for the other data.
???
Guess this reply does not belong to the current question but to the other thread of @Snowshoe_Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Check many points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What you posted is pretty amazing. I'll weed through it tomorrow. Thank You!
So for now, the finished product is attached. As I get more skilled, I can enhance the program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
stack needs [NaN NaN] or first row data with same cols. But if you do not need [NaN NaN], serect the data using submatrix functoin.
However, it can also do as follows.
Prime plot with each area color also here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
O.K. Thank you. I'll give that a try.