Skip to content

Commit 629ca88

Browse files
author
Rik
committed
rose.m: Fix regression where output variables always returned (bug #48889)
* rose.m: Rename output variables of function to 'thout', 'rout' so that internal variables 'th', 'r' are not automatically aliased to function return variables.
1 parent 2d8fc3a commit 629ca88

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/plot/draw/rose.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
## @deftypefnx {} {} rose (@var{theta}, @var{bins})
3030
## @deftypefnx {} {} rose (@var{hax}, @dots{})
3131
## @deftypefnx {} {@var{h} =} rose (@dots{})
32-
## @deftypefnx {} {[@var{th} @var{r}] =} rose (@dots{})
32+
## @deftypefnx {} {[@var{th}, @var{r}] =} rose (@dots{})
3333
## Plot an angular histogram.
3434
##
3535
## With one vector argument, @var{th}, plot the histogram with 20 angular bins.
@@ -71,7 +71,7 @@
7171
## "mod (th, 2*pi)" changes any 2*pi values to 0, this last bin should always
7272
## be zero and can be safely deleted.
7373

74-
function [th, r] = rose (varargin)
74+
function [thout, rout] = rose (varargin)
7575

7676
[hax, varargin, nargin] = __plt_get_axis_arg__ ("rose", varargin{:});
7777

@@ -160,8 +160,11 @@
160160
end_unwind_protect
161161

162162
if (nargout > 0)
163-
th = htmp;
163+
thout = htmp;
164164
endif
165+
else
166+
thout = th;
167+
rout = r;
165168
endif
166169

167170
endfunction

0 commit comments

Comments
 (0)