I can't seem to find a function in Matlab that allows me to plot a hodograph. Any ideas?
Direct link to this comment:
Did you find a solution to plot a hodgraph. I seem to find a solution to plot the points but since i am not a Matlab expert. I cannot find a way to connect the points within the hodograph...I am positing a minimal example here
Ws = 15.*rand(10,1);
Wd = 360.*rand(10,1);
H = (20:20:200)';
Wd = double(Wd);
Ws = double(Ws);
Wd = Wd.*(pi/180);
[WdX, WsY] = pol2cart(Wd, Ws);
It would be great if you would write the solution you came to. I am unable to think of something to connect the points within the polar plot
No products are associated with this question.
Direct link to this answer:
I do have an answer to connect the points here is the simple Hodograph example. However, i am not sure if the wind direction is correctly displayed. I am sure i am doing something wrong there. Any suggestions to make the wind directions correct??
Ws = [6.4;6.7;7.4;7.4;7.7;7.9;8.5;8.9;9.1;9.5];
Wd = [185;186;183;186;186.5;187;191;192;197;193];
H = [40;52;60;80;100;108;140;160;180;200];
Wd = Wd.*(pi/180);
Ws = Ws;
[U, V] = pol2cart(Wd, Ws);
text(U, V, num2str(H));
%WdXi = flipud((min(WdX):0.1:max(WdX))');
%WsYi = interp1(WdX, WsY, WdXi,'spline' );
t = 1:numel(Ws);
ts = 1:1/numel(Ws):numel(Ws);
xs = pchip(t,U,ts);
ys = pchip(t, V, ts);
Log In to answer or comment on this question.
Play games and win prizes!
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
New to MATLAB?
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
See all countries