Calculating distance for a wave/wind model given in lake coordinates and outline coordinates.

7 次查看(过去 30 天)
Making a wave wind model of Lake Superior. I have xyz (lat/long/depth) data for thousands of points in the lake. I also have data showing the outline of the lake. I need to be able to calculate the fetch distance for every point given a wind angle. The issue is identifying the shoreline point to use to calculate the distance. Looking for a function that can create a vector from in lake points to a point on the shore in the direction of the wind. The end goal is to assign fetch distance to every point, and have wind direction as a variable i can change. Fairly new to Matlab and looking for all the help I can get. Thanks!!

采纳的回答

KSSV
KSSV 2017-10-18
So, you know the angle...._theta_ that means you know the slope.....and you have a point from which you want to calculate where it intersects the boundary/ shoreline. Do the following:
1. Get the slope of straight line as you know the angle. (m = tan(theta))
2. Get the equation of straight line with known slope m and passing through the point (x,y).
3. From the equation you will get the set of points lying on the straight line.
4. So now you have two set of points. One set is points of straight line and other set is set of points of shore line/ boundary. Now you need to get the intersection point. Use this function InterX to get the intersection points. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by