Mercurial > hg > octave-lyh
annotate examples/@polynomial/plot.m @ 17191:ca5103ab0b21
check_gzip_magic before get_file_format (wrong type detection, bug #39652)
* load-save.cc (get_file_format): call check_gzip_magic before get_file_format
to avoid random LS_MAT_ASCII detections in gzipped files.
* ls-mat-ascii.cc (looks_like_mat_ascii_file): New arg, IS which could also
be a gzipped file, is now opened in the calling function.
* ls-mat-ascii.h (looks_like_mat_ascii_file): New arg, IS.
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Fri, 02 Aug 2013 19:48:34 +0200 |
parents | 1b48b209a8d6 |
children |
rev | line source |
---|---|
14855
1b48b209a8d6
maint: Use Octave coding conventions for coddling parentheses in examples directory
Rik <octave@nomad.inbox5.com>
parents:
8256
diff
changeset
|
1 function h = plot (p, varargin) |
8223
0c91b9a17dcf
Commit missing files from previous change
David Bateman <dbateman@free.fr>
parents:
diff
changeset
|
2 n = 128; |
0c91b9a17dcf
Commit missing files from previous change
David Bateman <dbateman@free.fr>
parents:
diff
changeset
|
3 rmax = max (abs (roots (p.poly))); |
0c91b9a17dcf
Commit missing files from previous change
David Bateman <dbateman@free.fr>
parents:
diff
changeset
|
4 x = [0 : (n - 1)] / (n - 1) * 2.2 * rmax - 1.1 * rmax; |
0c91b9a17dcf
Commit missing files from previous change
David Bateman <dbateman@free.fr>
parents:
diff
changeset
|
5 if (nargout > 0) |
14855
1b48b209a8d6
maint: Use Octave coding conventions for coddling parentheses in examples directory
Rik <octave@nomad.inbox5.com>
parents:
8256
diff
changeset
|
6 h = plot (x, p(x), varargin{:}); |
8223
0c91b9a17dcf
Commit missing files from previous change
David Bateman <dbateman@free.fr>
parents:
diff
changeset
|
7 else |
14855
1b48b209a8d6
maint: Use Octave coding conventions for coddling parentheses in examples directory
Rik <octave@nomad.inbox5.com>
parents:
8256
diff
changeset
|
8 plot (x, p(x), varargin{:}); |
8223
0c91b9a17dcf
Commit missing files from previous change
David Bateman <dbateman@free.fr>
parents:
diff
changeset
|
9 endif |
14855
1b48b209a8d6
maint: Use Octave coding conventions for coddling parentheses in examples directory
Rik <octave@nomad.inbox5.com>
parents:
8256
diff
changeset
|
10 endfunction |