simulink - "Path" when using signalbuilder command in matlab -
i'm trying use signalbuilder command in matlab script add signal builder block in specific existing model every time try message
invalid block path
so think problem path variable used in command can't figure out right format it. model have signal_building.mdl. when path empty ([]
) new model created specified signal builder. code follows:
time = 0:0.1:10; data = {sin(time),sinh(time),(time);cos(time),cosh(time),(time).^2;tan(time),tanh(time),sqrt(time)}; groupnames = {'triangular', 'hyperbolic', 'algebric'}; signames = {'data_1','data_2','data_3'}; path = 'c:\users\me\desktop\matlab_learning\signal_building.mdl'; block = signalbuilder(path, 'create', time, data, signames, groupnames);
so, i'll appreciate 1 can correct way defining path
path
path (i.e. heirarchy) within model want block placed. it's not path of simulink model within computer's file structure.
for instance,
>> new_system('mymodel') >> open_system('mymodel') >> signalbuilder('mymodel/myblock','create',1:10,1:10);
Comments
Post a Comment