view test/bug-59661/bug59661.m @ 31237:e3016248ca5d

uifigure.m: Call set () only if varargin is not empty (bug #63088) * uifigure.m: Call set () only if varargin is not empty.
author John Donoghue <john.donoghue@ieee.org>
date Wed, 21 Sep 2022 09:55:32 -0400
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