COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Arrows of the same length in a quiver plot

• Follow

```Hey Guys,

I would like to have arrows of the same length in a quiver plot. I read that one should normalize the velocity vectors for that. I tried something, but it does not give arrows of one length:

[k c] = meshgrid(0:0.4:10, 0:0.4:3.2);
dk = k.^(0.25) - 0.06.*k - c;
dc = (0.5.*k.^(-0.75) - 0.16).*c;
L = sqrt(dk.^2 + dc.^2);              % vector lengths
quiver(k, c, dk./L, dc./L, 1.3, 'Color', 'blue');

Hints would be greatly appreciated! Thanks!
```
 0

```MATLAB can be tricky sometimes:

[k c] = meshgrid(0:.4:10, 0:.4:3.2);
dk = k.^(0.25) - 0.06.*k - c;
dc = (0.5.*k.^(-0.75) - 0.16).*c;
L = sqrt(dk.^2 + dc.^2); % vector lengths
quiver(k, c, dk./L, dc./L,0);
ylim([-.5 4])
axis equal  % Looky here.
```
 0

```> ylim([-.5 4])
> axis equal  % Looky here.

Hey, thanks a lot for this hint with axis equal. Excellent, that was the point I was missing. I prefer to adjust dc./L by (3.2/10). Thanks for your quick reply!
```
 0

2 Replies
1316 Views

Similiar Articles:

7/22/2012 7:48:56 AM