0

I have 2 classes in folder :

  • C:\controller\functions\VerifyModel.m

  • C:\OGVD\prod\KMLP\controller\controllerStatus.m

VerifyModel.m

classdef verifyModel < matlab.unittest.TestCase
    methods(access=public)
        function...
    end
end

controllerStatus.m

classdef controllerStatus < verifyModel
    .....
end

but when I run controllerStatus.m, I got an error as the class I used isn't in the path. I've tried by adding C:\controller\functions\@VerifyModel\VerifyModel.m

What I could do so that the class is added in the path?

chappjc
  • 30,359
  • 6
  • 75
  • 132
lola
  • 5,649
  • 11
  • 49
  • 61
  • You have not said if that folder is on your path. Not the @ folder of course, as it MUST not be so. Nor have you told us if you have tried a "clear classes" command. This is sometimes useful. –  Sep 20 '13 at 12:19
  • I think you should either make sure they are both in the same folder OR you could add one of the two as a function within the other class? – Fraukje Sep 20 '13 at 12:19
  • my problem is that the class isn't on the matlab path serach , I don't want to use addpath(...) but added VerifyModel.m in @VerifyModel folder and from the second class inherit VerifyModel – lola Sep 20 '13 at 12:25
  • Why don't you want to use addpath? addpath is the correct matlab function for what you are trying to do. – grantnz Sep 22 '13 at 09:58

0 Answers0