MATLAB超类不能在MATLAB的搜索路径上找到 [英] MATLAB superclass can not be found on the MATLAB's search path

查看:1185
本文介绍了MATLAB超类不能在MATLAB的搜索路径上找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个路径:


  • C:\controller\functions\verifyModel.m

  • C:\OGVD\prod\KMLP\controller\controllerStatus.m / li>
  • C:\controller\functions\verifyModel.m
  • C:\OGVD\prod\KMLP\controller\controllerStatus.m
classdef verifyModel 
    methods(access=public)
        function...
    end
end

$ b b

controllerStatus.m



controllerStatus.m

classdef controllerStatus < verifyModel     
   .....
end

但是当我运行 controllerStatus.m ,我得到一个错误,因为我使用的类不在路径
如何添加 verifyModel 到路径?

but when I run controllerStatus.m, I got an error as the class I used isn't in the path how could I add verifyModel to the path ?

推荐答案

在使用controllerStatus之前:

Before usage of controllerStatus use:

addpath('C:\controller\functions\')

此外,您可能需要插入 @ folder 。这些文件夹在可见时添加到路径,因为它们是您当前路径( pwd )的子文件夹。

Also, you might want to put in in a @ folder. These folders are added to the path whenever they are visible, so as they are a subfolder of your current path(pwd).

或将'C:\controller\functions \'添加到您的静态matlab路径,我不推荐。

Or add 'C:\controller\functions\' to your static matlab path, what I do not recommend.

=http://stackoverflow.com/questions/9781866/folder-and-foldertitle =so>此答案。

See also this answer.

这篇关于MATLAB超类不能在MATLAB的搜索路径上找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆