Answered my own question, but posting for future reference (Method not defined or removed from search path)

10 次查看(过去 30 天)
I have a class method calling a superclass method, ie,
getData@headerDirectory.SuperClassObject(sub_class_obj,rawData)
I have a getData method written for the superclass, yet when I called the getData method for the "subclass", I get the error "Method 'getData' is not defined for class 'headerDirectory.SuperClassObject' or is removed from MATLAB's search path.
I run
which -all getData
and get the path for both classes. I have another similar project where I do the same thing, so I could not figure out why this wasn't working.
I realized that in my superclass directory, I had +headerDirectory, but no @SuperClassObj folder. The methods and classdef file were free floating in the +headerDirectory.
I don't know if anyone else has accidentally done this, it took me embarassingly too long to figure it out.

采纳的回答

Ryan
Ryan 2014-10-16
Answer in post.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Construct and Work with Object Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by