4
|
1 function plot_2_m_m (x, y) |
|
2 |
|
3 if (nargin != 2) |
|
4 error ("usage: plot_2_m_m (x, y)"); |
|
5 endif |
|
6 |
|
7 [x_nr, x_nc] = size (x); |
|
8 [y_nr, y_nc] = size (y); |
|
9 |
|
10 if (x_nr == y_nr && x_nc == y_nc) |
|
11 if (x_nc > 0) |
|
12 tmp = [x, y]; |
|
13 command = sprintf ("gplot tmp(:,%d:%d:%d)", 1, x_nc, x_nc+1); |
|
14 for i = 2:x_nc |
|
15 command = sprintf ("%s, tmp(:,%d:%d:%d)", command, i, x_nc, x_nc+i); |
|
16 endfor |
|
17 eval (command); |
|
18 else |
|
19 error ("plot_2_m_m: arguments must be a matrices"); |
|
20 endif |
|
21 else |
|
22 error ("plot_2_m_m: matrix dimensions must match"); |
|
23 endif |
|
24 |
|
25 endfunction |