view test/classdef/foo_method_changes_property_size.m @ 32060:1203a2d81a42

Add BIST tests for Matlab compatibility for functions which accept negative dimensions. * data.cc (Fones, Finf, Feps, Feye): Add BIST test for negative dimensions. * rand.cc (Frand): Add BIST test for negative dimensions. * ov-cell.cc (Fcell): Add BIST test for negative dimensions.
author Rik <rik@octave.org>
date Wed, 26 Apr 2023 16:26:32 -0700
parents ebd2259c5df1
children
line wrap: on
line source

classdef foo_method_changes_property_size
  properties
    element;
  end
  methods
    function obj = foo_method_changes_property_size (n)
      obj.element = 1:n;
    end
    function obj = move_element_to_end (obj, n)
      obj.element(end+1) = obj.element(n);
      obj.element(n) = [];
    end
  end
end