• 大小: 3KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-03
  • 语言: Matlab
  • 标签: advisor  matlab  

资源简介

advisor 2002在高版本matlab下运行的补丁 亲测matlab r2014a 有效

资源截图

代码片段和文件信息

%this file will update all the block diagrams in the models directory in ADVISOR
%so that they will work in Mathworks Release 13.  This assumes that you have ADVISOR 2002
%and it is already included in your Matlab path which is done automatically when you type 
%advisor at the command prompt.  
%
% place this file in your current working directory in Matlab and type it‘s name.
%
% Here‘s what we posted on the advisor community web site regarding this error.

% Aug-30-2002 7:22 AM 

% Regarding the boolean type problem in R13: Release 13 of Matlab has introduced
% a new type called logical. The problem is in the block diagrams in the accessory 
% loads masked subsystem. Go to BD_PAR for instance and click on “mechanical accessory loads “ 
% then click on the “Mechanical Accessory Loads V2 “ block. You will see a mask window pop
% open. At the top you will see the “not“ function used. In release 12 and earlier this 
% function returned a 1 or a 0 for true and false. Now it returns a new type logical. This 
% is causing the problems. To fix the problem multiply by 1 (which causes a type change 
% to double). That should fix the logical errors. 

clear all
%change directories to the models directory
cd(strrep(which(‘advisor.m‘)‘advisor.m‘‘models‘))

%get the list of everything in the models directory
dir_list=dir;

%For the items in the directory that are .mdl files do the following
k=1;
for i=1:length(dir_list)
    if ~isempty(strfind(dir_list(i).name‘.mdl‘))
    

评论

共有 条评论