Search code examples
matlabmatlab-figure

Quiver - scale option


I tried to use the scale option in the quiver statement in the following way:

x=[0 7];
y=[0 0];
u=[1 -1];
w=[1 -1];
quiver(x,y,u,w)

figure(2)
quiver(x,y,u,w,scale=0.5)

but the last line does not work .

Error: The expression to the left of the equals sign is not a valid target for an assignment.

Thank you for your help.


Solution

  • The right syntax is: quiver(x,y,u,w,0.5). In the future look for the documentation (quiver) for some examples.