Matlab“值”类不能正常工作

时间:2016-11-07 08:16:49

标签: matlab matlab-class

我做了一个简单的Matlab类

classdef WavReader
...

我试图使用它:

wr = WavReader(in_path);
wr.SetChunkLength( block_size);
while true    
    out = wr.ReadChunk();

但是,这不起作用:在执行循环之前,某些类属性被“遗忘”,从而导致错误。

如果我将一个类定义为handle

classdef WavReader < handle
...

一切都很好。

我在哪里弄错了价值类?

0 个答案:

没有答案
相关问题