Mercurial > hg > octave-lyh
comparison scripts/plot/__plt2__.m @ 933:598a3aa40360
[project @ 1994-11-17 04:23:41 by jwe]
Initial revision
author | jwe |
---|---|
date | Thu, 17 Nov 1994 04:23:41 +0000 |
parents | |
children | 3f257ab07921 |
comparison
equal
deleted
inserted
replaced
932:1c9812d0cf59 | 933:598a3aa40360 |
---|---|
1 # Copyright (C) 1994 John W. Eaton | |
2 # | |
3 # This file is part of Octave. | |
4 # | |
5 # Octave is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License as published by the | |
7 # Free Software Foundation; either version 2, or (at your option) any | |
8 # later version. | |
9 # | |
10 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 # for more details. | |
14 # | |
15 # You should have received a copy of the GNU General Public License | |
16 # along with Octave; see the file COPYING. If not, write to the Free | |
17 # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
18 | |
19 function plot_int_2 (x1, x2, fmt) | |
20 | |
21 if (nargin < 2 || nargin > 3) | |
22 usage ("plot_int_2 (x1, x2, fmt)"); | |
23 endif | |
24 | |
25 if (nargin == 2) | |
26 fmt = ""; | |
27 endif | |
28 | |
29 if (! isstr (fmt)) | |
30 error ("plot_int_2: fmt must be a string"); | |
31 endif | |
32 | |
33 if (any (any (imag (x1)))) | |
34 x1 = real (x1); | |
35 endif | |
36 if (any (any (imag (x2)))) | |
37 x2 = real (x2); | |
38 endif | |
39 if (is_scalar (x1)) | |
40 if (is_scalar (x2)) | |
41 plot_2_s_s (x1, x2, fmt); | |
42 endif | |
43 elseif (is_vector (x1)) | |
44 if (is_vector (x2)) | |
45 plot_2_v_v (x1, x2, fmt); | |
46 elseif (is_matrix (x2)) | |
47 plot_2_v_m (x1, x2, fmt); | |
48 endif | |
49 elseif (is_matrix (x1)) | |
50 if (is_vector (x2)) | |
51 plot_2_m_v (x1, x2, fmt); | |
52 elseif (is_matrix (x2)) | |
53 plot_2_m_m (x1, x2, fmt); | |
54 endif | |
55 endif | |
56 | |
57 endfunction |