Mercurial > octave-nkf
comparison scripts/control/system/sysdisc.m @ 7001:8b0cfeb06365
[project @ 2007-10-10 18:02:59 by jwe]
author | jwe |
---|---|
date | Wed, 10 Oct 2007 18:03:02 +0000 |
parents | 34f96dd5441b |
children | 93c65f2a5668 |
comparison
equal
deleted
inserted
replaced
7000:e87f860624cc | 7001:8b0cfeb06365 |
---|---|
31 ## @item dsys | 31 ## @item dsys |
32 ## Purely discrete portion of sys (returned empty if there is | 32 ## Purely discrete portion of sys (returned empty if there is |
33 ## no purely discrete path from inputs to outputs). | 33 ## no purely discrete path from inputs to outputs). |
34 ## @item adc | 34 ## @item adc |
35 ## @itemx cdc | 35 ## @itemx cdc |
36 ## Connections from continuous states to discrete states and discrete. | 36 ## Connections from continuous states to discrete states and discrete |
37 ## outputs, respectively. | 37 ## outputs, respectively. |
38 ## @end table | 38 ## @end table |
39 ## @end deftypefn | 39 ## @end deftypefn |
40 | 40 |
41 function [dsys, Adc, Cdc] = sysdisc (sys) | 41 function [dsys, Adc, Cdc] = sysdisc (sys) |
51 | 51 |
52 ## assume there's nothing there; build partitions as appropriate | 52 ## assume there's nothing there; build partitions as appropriate |
53 Add = Adc = Bdd = Cdd = Cdc = Ddd = []; | 53 Add = Adc = Bdd = Cdd = Cdc = Ddd = []; |
54 | 54 |
55 if(isempty(st_d) & isempty(y_d)) | 55 if(isempty(st_d) & isempty(y_d)) |
56 error("sysdisc: expecting discrete states and/or continous outputs"); | 56 error("sysdisc: expecting discrete states and/or continuous outputs"); |
57 elseif (isempty(st_d)) | 57 elseif (isempty(st_d)) |
58 warning("sysdisc: no discrete states"); | 58 warning("sysdisc: no discrete states"); |
59 elseif(isempty(y_d)) | 59 elseif(isempty(y_d)) |
60 warning("sysdisc: no discrete outputs"); | 60 warning("sysdisc: no discrete outputs"); |
61 endif | 61 endif |