view test/bug-59661/bug59661.m @ 33589:f07a7fe7bd51 default tip @

maint: merge stable to default
author Rik <rik@octave.org>
date Thu, 16 May 2024 08:32:01 -0700
parents 370b5ded5e6a
children
line wrap: on
line source

classdef bug59661 < handle

  properties
    p = [];
  endproperties

  methods

    function o = bug59661 (varargin)
      o.p = [varargin{:}];
    endfunction

    function res = eq (a, b)

      if (numel (a.p) > 1 && numel (b.p) > 1 && ! isequal (size (a.p), size (b.p)))
        res = false;
        return;
      endif

      if (isequal (size (a.p), size (b.p)))
        res = eq (a.p, b.p);
      else
        res = bsxfun (@eq, a.p, b.p);
      endif

    endfunction

  endmethods
endclassdef