Mercurial > hg > octave-nkf
comparison examples/paramdemo.cc @ 9932:6cb30a539481
untabify files in examples directory
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 07 Dec 2009 14:53:20 -0500 |
parents | 4295d634797d |
children | db1f49eaba6b |
comparison
equal
deleted
inserted
replaced
9931:fb6b6fcafa62 | 9932:6cb30a539481 |
---|---|
1 #include <octave/oct.h> | 1 #include <octave/oct.h> |
2 | 2 |
3 DEFUN_DLD (paramdemo, args, nargout, | 3 DEFUN_DLD (paramdemo, args, nargout, |
4 "Parameter Check Demo.") | 4 "Parameter Check Demo.") |
5 { | 5 { |
6 int nargin = args.length (); | 6 int nargin = args.length (); |
7 octave_value retval; | 7 octave_value retval; |
8 | 8 |
9 if (nargin != 1) | 9 if (nargin != 1) |
20 octave_stdout << " includes negative values\n"; | 20 octave_stdout << " includes negative values\n"; |
21 if (m.any_element_is_inf_or_nan()) | 21 if (m.any_element_is_inf_or_nan()) |
22 octave_stdout << " includes Inf or NaN values\n"; | 22 octave_stdout << " includes Inf or NaN values\n"; |
23 if (m.any_element_not_one_or_zero()) | 23 if (m.any_element_not_one_or_zero()) |
24 octave_stdout << | 24 octave_stdout << |
25 " includes other values than 1 and 0\n"; | 25 " includes other values than 1 and 0\n"; |
26 if (m.all_elements_are_int_or_inf_or_nan()) | 26 if (m.all_elements_are_int_or_inf_or_nan()) |
27 octave_stdout << | 27 octave_stdout << |
28 " includes only int, Inf or NaN values\n"; | 28 " includes only int, Inf or NaN values\n"; |
29 if (m.all_integers (min_val, max_val)) | 29 if (m.all_integers (min_val, max_val)) |
30 octave_stdout << | 30 octave_stdout << |
31 " includes only integers in [-10,10]\n"; | 31 " includes only integers in [-10,10]\n"; |
32 } | 32 } |
33 return retval; | 33 return retval; |
34 } | 34 } |