How to plot quiver vectors of same length and plot streamlines in Matlab?

21 Views Asked by At

I have a velocity field from a glacier (horizontal: ui, and vertical: wi). I can plot it with the code below. How can I (1) make sure that all quiver arrows are of equal length? (2) transform these data into streamlines with arrows pointing the direction? Thanks! (see attachment for files)

realxh=load('realxh_data.mat').realxh;
realzh=load('realzh_data.mat').realzh;
ui=load('ui_data.mat').ui;
wi=load('wi_data.mat').wi;
figure(1);
quiver(realxh(:,1:nx-1)/1000, realzh(:,1:nx-1), ui(:,1:nx-1), wi(:,1:nx-1));
title('Temperature distribution (°C)');
xlabel('x [km]');
ylabel('Surface elevation [m]');
axis([-10 330 -10 2600])

Please see for files: https://nl.mathworks.com/matlabcentral/answers/2096516-how-to-plot-quiver-vectors-of-same-length-and-plot-streamlines

enter image description here

0

There are 0 best solutions below