MATLAB Object-Oriented Programming

(Joyce) #1
gongSound.SampleRate

Invalid or deleted object.

Functions and methods that access object properties cause an error:

play(gongSound)

Invalid or deleted object.

To remove the variable, gongSound, use clear:

clear gongSound
whos

Name Size Bytes Class Attributes

Fs 1x1 8 double
y 42028x1 336224 double

See Also


More About



  • “Handle Class Destructor” on page 7-16

  • “Comparison of Handle and Value Classes” on page 7-2


1 Using Object-Oriented Design in MATLAB

Free download pdf