Filter data for plot range

4 Ansichten (letzte 30 Tage)
Fabian Leede
Fabian Leede am 19 Sep. 2020
Kommentiert: Ameer Hamza am 20 Sep. 2020
Hi Everyone,
For my study we have to design the trimming system of a submarine. For this you can plot a trimming polygon and for each loadcase a corresponding weight and trimming moment. If the loadcase is in the polygon you're fine.
For this exercise that is (obviously) not the case. So we have to add ballast. What I want to do is make matlab calculate the moment and mass for a range of mass and location parameters for the ballast. That part is working fine. I then want Matlab to plot the datapoints in the polygon and check if the values are inside te polygon. That is the part where I'm not sure how to approach it. In the figure three loadcases are plotted (red, green and blue). They all need to fit inside the polygon for a ballast mass and location.
Short version: How can I make matlab filter out datapoints that are not inside the black line in the plot?
Thanks in advance!
(Code in attached doc)

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 19 Sep. 2020
  2 Kommentare
Fabian Leede
Fabian Leede am 20 Sep. 2020
I kinda knew it was possible. But that it is this simple...
Thanks!
Ameer Hamza
Ameer Hamza am 20 Sep. 2020
I am glad to be of help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by