Calculating distance for a wave/wind model given in lake coordinates and outline coordinates.
조회 수: 3 (최근 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!!
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!