Rank: 415050 based on 0 downloads (last 30 days) and 0 file submitted
photo

Tobias

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Tobias
Updated File Comments Rating
14 Feb 2012 arrow.m Draw a line with an arrowhead. Author: Erik Johnson

Regarding W & Jacopo,

setting the view before the arrow functions solves your problem e.g.:

clc; clear; close all

xvector=[1 0 0];
yvector=[0 1 0];
zvector=[0 0 1];

figure
grid on
daspect([1 1 1])
xlabel('x [mm]', 'FontWeight', 'bold')
ylabel('y [mm]', 'FontWeight', 'bold')
zlabel('z [mm]', 'FontWeight', 'bold')

%Here goes the view setting
view([1 1 1])

arrow([0 0 0],xvector, 'EdgeColor','k','FaceColor','k')
arrow([0 0 0],yvector, 'EdgeColor','b','FaceColor','b')
arrow([0 0 0],zvector, 'EdgeColor','r','FaceColor','r')

%Not here
%view([1 1 1])

Don't no why but seems to work!

BW,
Tobi

Contact us