Code covered by the BSD License  

Highlights from
Doraemon Helper Block

image thumbnail

Doraemon Helper Block

by

 

07 Feb 2011 (Updated )

A helper block that allow you to add blocks at ease.

enabledora( varargin )
function  enabledora( varargin )
%ENABLEDORA Enable Doraemon in a simulink model
%   Detailed explanation goes here

load_system('Doraemon');

if (nargin==0)
    mdl = gcs;
else
    mdl = varargin{1};
end

if isempty(find_system('Name',mdl))
    new_system(mdl);
    open_system(mdl);
end

if isempty(find_system(gcs, 'Name','Doraemon'))
    add_block('Doraemon/Dora',[mdl,'/Doraemon'],'Position',[0,0,50,50]);
else
    errordlg(['Doraemon is already there in ',mdl])
end 

end

Contact us