19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.22 1998/07/04 07:10:27 peterg
% %% Don't evaluate alias if no constitutive relationship or args and write
% %% message.
% %%
% %% Revision 1.21 1998/07/03 18:58:58 peterg
% %% Put arg alias stuff within function alias_args
% %% Called recursively to handle arithmetic expressions
|
>
>
>
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
% Structure matrix [states,nonstates,inputs,outputs,zero_outputs]
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.23 1998/07/08 12:33:51 peterg
% %% Reinstated the infofilenum parameter.
% %%
% %% Revision 1.22 1998/07/04 07:10:27 peterg
% %% Don't evaluate alias if no constitutive relationship or args and write
% %% message.
% %%
% %% Revision 1.21 1998/07/03 18:58:58 peterg
% %% Put arg alias stuff within function alias_args
% %% Called recursively to handle arithmetic expressions
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
% Get the component details
eval([ '[comp_type,comp_name,cr,args,repetitions] = ', cmp_name, '(i)' ...
]);
% Alias the args list -- if not at top level
message = sprintf("\tfor component %s (%s) within %s",\
comp_name,comp_type,full_name);
if (length(system_args)>0)
args = alias_args(args,alias,";",message)
end;
if (length(system_cr)>0)
cr = alias_args(cr,alias,";",message)
end;
% Substitute positional ($1 etc) arguments
cr = subs_arg(cr,system_cr, ...
'lin',full_name,comp_type,comp_name);
args = subs_arg(args,system_args, ...
'1',full_name,comp_type,comp_name);
% change name of 0 and 1 components -- matlab doesn't like numbers here
if strcmp(comp_type,'0')
comp_type = 'zero';
end;
if strcmp(comp_type,'1')
comp_type = 'one';
|
<
|
|
|
|
|
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
% Get the component details
eval([ '[comp_type,comp_name,cr,args,repetitions] = ', cmp_name, '(i)' ...
]);
% Alias the args list -- if not at top level
message = sprintf("\tfor component %s (%s) within %s",\
comp_name,comp_type,full_name);
if (length(system_args)>0)
args = alias_args(args,alias,";",message,infofilenum)
end;
if (length(system_cr)>0)
cr = alias_args(cr,alias,";",message,infofilenum)
end;
% Substitute positional ($1 etc) arguments
cr = subs_arg(cr,system_cr, ...
'lin',full_name,comp_type,comp_name,infofilenum);
args = subs_arg(args,system_args, ...
'1',full_name,comp_type,comp_name,infofilenum);
% change name of 0 and 1 components -- matlab doesn't like numbers here
if strcmp(comp_type,'0')
comp_type = 'zero';
end;
if strcmp(comp_type,'1')
comp_type = 'one';
|