Mercurial > octave-nkf
comparison scripts/image/cubehelix.m @ 19885:059a05bc398c
Replace 'Octave:broadcast' warning with 'Octave:matlab-incompatible'.
* liboctave/numeric/bsxfun.h: replace the 'Octave:broadcasting' with the more
common 'Octave:matlab-compatible' warning which is off by default.
* plot/appearance/annotation.m, image/cubehelix.m: remove turning off the
warning since now it is done by default.
* miscellaneous/warning_ids.m: remove entry about Octave:broadcast
* NEWS: make note of this change.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Sat, 21 Feb 2015 16:38:53 +0000 |
parents | 9fc020886ae9 |
children | 21dbaf135667 |
comparison
equal
deleted
inserted
replaced
19884:f81a1da191e4 | 19885:059a05bc398c |
---|---|
62 | 62 |
63 fract = ((0:n-1) / (n-1))'; | 63 fract = ((0:n-1) / (n-1))'; |
64 angle = 2 * pi * (start/3 + 1 + rots*fract); | 64 angle = 2 * pi * (start/3 + 1 + rots*fract); |
65 fract = fract .^ gamma; | 65 fract = fract .^ gamma; |
66 amp = hue * fract .* (1-fract) /2; | 66 amp = hue * fract .* (1-fract) /2; |
67 warning ("off", "Octave:broadcast", "local"); | |
68 map = fract + amp .* ([cos(angle) sin(angle)] * coeff); | 67 map = fract + amp .* ([cos(angle) sin(angle)] * coeff); |
69 | 68 |
70 ## Clip values (only in case users have changed values of hue or gamma) | 69 ## Clip values (only in case users have changed values of hue or gamma) |
71 map(map < 0) = 0; | 70 map(map < 0) = 0; |
72 map(map > 1) = 1; | 71 map(map > 1) = 1; |