Mercurial > octave-nkf
comparison examples/@polynomial/display.m @ 14855:1b48b209a8d6
maint: Use Octave coding conventions for coddling parentheses in examples directory
* display.m, subsref.m, display.m, mtimes.m, plot.m, polyval.m, myprop.c,
stringdemo.cc, unwinddemo.cc: Use Octave coding conventions for coddling
parentheses.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 09 Jul 2012 13:23:31 -0700 |
parents | 567e3e4ab74d |
children |
comparison
equal
deleted
inserted
replaced
14854:5ae9f0f77635 | 14855:1b48b209a8d6 |
---|---|
1 function display (p) | 1 function display (p) |
2 a = p.poly; | 2 a = p.poly; |
3 first = true; | 3 first = true; |
4 fprintf("%s =", inputname(1)); | 4 fprintf ("%s =", inputname (1)); |
5 for i = 1 : length (a); | 5 for i = 1 : length (a); |
6 if (a(i) != 0) | 6 if (a(i) != 0) |
7 if (first) | 7 if (first) |
8 first = false; | 8 first = false; |
9 elseif (a(i) > 0) | 9 elseif (a(i) > 0) |
24 fprintf (" ^ %d", i - 1); | 24 fprintf (" ^ %d", i - 1); |
25 endif | 25 endif |
26 endif | 26 endif |
27 endfor | 27 endfor |
28 if (first) | 28 if (first) |
29 fprintf(" 0"); | 29 fprintf (" 0"); |
30 endif | 30 endif |
31 fprintf("\n"); | 31 fprintf ("\n"); |
32 endfunction | 32 endfunction |