- Map Data Using Root Inport Mapper Tool - MATLAB & Simulink (mathworks.com)
- How to Bring Data from MATLAB Into Simulink | Hear from MATLAB & Simulink Developers - YouTube
How to take meshgrid of latitude and longitude as an input in Horizontal Wind Model 07?
7 次查看(过去 30 天)
显示 更早的评论
Hello, I'm a beginner of Simulink. I'm trying to get a wind distribution over a certain area (latitude:
, longitude:
) at specific time by using Horizontal Wind Model 07. However, this model only takes a 3 x 1 vector ([latitude; longitude; altitude]) as one of the inputs. Is there any way to pass a sequence of geographical data to the model?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1220122/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1220127/image.png)
For example, we would be able to create a grid point like below
% Center of grid point
mu0 = 10; % [deg], latitude
ell0 = 20; % [deg], longitude
h = 10; % [km], altitude
[M, L] = meshgrid(mu0 + linspace(-0.1, 0.1, 10), ...
ell0 + linspace(-0.1, 0.1, 10));
% reshape into vectors
mu = M(:); % (100 x 1)
ell = L(:); % (100 x 1)
In this case, how can we pass h, mu, and ell as the first input argument of the wind model?
0 个评论
回答(1 个)
Vishwa
2023-3-22
As the documentation says, first input to this block is a three element vector. First you need to cast your inputs to a timetable or timeseries data type. Then in Simulink you can import these inputs from either “From Workspace” block or from “Inport” block. These resources might be helpful:
Finally you can multiplex those three signal in Simulink to pass it to the first input port of Horizontal Wind Model 07.
Hope it helps.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!