从MatlabGUI加载SIMULINK模型,域错误

从MatlabGUI加载SIMULINK模型,域错误,matlab,dns,simulink,Matlab,Dns,Simulink,我需要从我的MatlabGUI打开一个现有的simulink模型。我对Simulink一点也不感兴趣,我只是需要让它以某种方式工作。要打开模型,我使用命令 open_system('filepath_to_model') 现在出现一个错误: Warning: Physical modeling domain definition file psatdomain.m not found. You will not be able simulate this model. Please close

我需要从我的MatlabGUI打开一个现有的simulink模型。我对Simulink一点也不感兴趣,我只是需要让它以某种方式工作。要打开模型,我使用命令

open_system('filepath_to_model')
现在出现一个错误:

Warning: Physical modeling domain definition file psatdomain.m not found. You will not be able simulate this model. Please close
your model, then add the domain definition file to the MATLAB path and re-open your model.
这个错误意味着什么?我将psatdomain.m添加到模型的目录中,但错误保持不变

%PSATDOMAIN定义PSAT Simulink库的域

我很高兴能得到您的帮助,这样我就可以打开一个现有的Simulink模型并从我的MatlabGUI运行它

非常感谢


向您致意,John

您的Simulink模型中是否有需要此
psatdomain.m
文件的自定义块?如果到它的绝对/相对路径在这些块定义中的某个位置硬编码,则最好将文件的原始路径添加到MATLAB路径,而不是将其复制到模型目录。您可能还想检查对该MATLAB文件的任何调用。我猜调试该文件的第一步是尝试从MATLAB打开Simulink模型,看看是否存在相同的错误。如果不是,则与GUI有关,很可能是路径/目录问题。