IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
draw_direction.m
Go to the documentation of this file.
1 %>@ingroup graphicsapi
2 %>@file
3 %>@brief Traces a line and an arrow in direction defined by v
4 %
5 %> @param v must be a COLUMN vector
6 %> @param linescale =10
7 %> @param arrowscale =3
8 function draw_direction(v, linescale, arrowscale)
9 
10 if ~exist('linescale')
11  linescale = 10;
12 end;
13 if ~exist('arrowscale')
14  arrowscale = 3;
15 end;
16 
17 x = v(1, 1);
18 y = v(2, 1);
19 plot(linescale*[-x, x], linescale*[-y, y], 'k--');
20 hold on;
21 compass(-arrowscale*x, -arrowscale*y, 'k'); % represents first eigenvector of S_W^(-1)*S_B as an arrow
22 
function draw_direction(in v, in linescale, in arrowscale)
Analysis Session (AS) base class.
Definition: as.m:6