|
19 | 19 | iscontinuous{T}(::LtiSystem{Val{T},Val{:cont}}) = true
|
20 | 20 | iscontinuous{T}(::LtiSystem{Val{T},Val{:disc}}) = false
|
21 | 21 | isdiscrete(s::LtiSystem) = !iscontinuous(s)
|
22 |
| - |
23 |
| -function samplingtime(s::LtiSystem) |
24 |
| - warn("samplingtime(s) not implemented for s::$(typeof(s))") |
25 |
| - throw(MethodError(samplingtime, Tuple{typeof(s)})) |
26 |
| -end |
27 |
| - |
28 |
| -# State, input, output information |
29 |
| -function numstates(s::LtiSystem) |
30 |
| - warn("numstates(s) not implemented for s::$(typeof(s))") |
31 |
| - throw(MethodError(numstates, Tuple{typeof(s)})) |
32 |
| -end |
33 |
| - |
34 |
| -function numinputs(s::LtiSystem) |
35 |
| - warn("numinputs(s) not implemented for s::$(typeof(s))") |
36 |
| - throw(MethodError(numinputs, Tuple{typeof(s)})) |
37 |
| -end |
38 |
| - |
39 |
| -function numoutputs(s::LtiSystem) |
40 |
| - warn("numoutputs(s) not implemented for s::$(typeof(s))") |
41 |
| - throw(MethodError(numoutputs, Tuple{typeof(s)})) |
42 |
| -end |
43 |
| - |
44 |
| -# # Iteration interface (meaningful in MIMO) |
45 |
| -# function start(s::LtiSystem{Val{:mimo}}) |
46 |
| -# warn("start(s) not implemented for s::$(typeof(s))") |
47 |
| -# throw(MethodError(start, Tuple{typeof(s)})) |
48 |
| -# end |
49 |
| -# |
50 |
| -# function next(s::LtiSystem{Val{:mimo}}, state) |
51 |
| -# warn("next(s, state) not implemented for (s::$(typeof(s)), state::$(typeof(state)))") |
52 |
| -# throw(MethodError(next, Tuple{typeof(s),typeof(state)})) |
53 |
| -# end |
54 |
| -# |
55 |
| -# function done(s::LtiSystem{Val{:mimo}}, state) |
56 |
| -# warn("done(s, state) not implemented for (s::$(typeof(s)), state::$(typeof(state)))") |
57 |
| -# throw(MethodError(done, Tuple{typeof(s),typeof(state)})) |
58 |
| -# end |
59 |
| -# |
60 |
| -# function eltype(s::Type{LtiSystem{Val{:mimo}}}) |
61 |
| -# warn("eltype(s) not implemented for s::$(typeof(s))") |
62 |
| -# throw(MethodError(eltype, Tuple{typeof(s)})) |
63 |
| -# end |
64 |
| -# |
65 |
| -# function length(s::LtiSystem{Val{:mimo}}) |
66 |
| -# warn("length(s) not implemented for s::$(typeof(s))") |
67 |
| -# throw(MethodError(length, Tuple{typeof(s)})) |
68 |
| -# end |
69 |
| -# |
70 |
| -# function size(s::LtiSystem{Val{:mimo}}, d) |
71 |
| -# warn("size(s, d) not implemented for (s::$(typeof(s)), d::$(typeof(d)))") |
72 |
| -# throw(MethodError(size, Tuple{typeof(s),typeof(d)})) |
73 |
| -# end |
74 |
| -# |
75 |
| -# # Indexing |
76 |
| -# function getindex(s::LtiSystem{Val{:mimo}}, i) |
77 |
| -# warn("getindex(s, i) not implemented for (s::$(typeof(s)), i::$(typeof(i)))") |
78 |
| -# throw(MethodError(getindex, Tuple{typeof(s),typeof(i)})) |
79 |
| -# end |
80 |
| -# |
81 |
| -# function setindex!(s::LtiSystem{Val{:mimo}}, v, i) |
82 |
| -# warn("setindex!(s, v, i) not implemented for (s::$(typeof(s)), v::$(typeof(v)), i::$(typeof(i)))") |
83 |
| -# throw(MethodError(setindex!, Tuple{typeof(s),typeof(v),typeof(i)})) |
84 |
| -# end |
85 |
| -# |
86 |
| -# function endof(s::LtiSystem{Val{:mimo}}) |
87 |
| -# warn("endof(s) not implemented for s::$(typeof(s))") |
88 |
| -# throw(MethodError(endof, Tuple{typeof(s)})) |
89 |
| -# end |
90 |
| -# |
91 |
| -# # Simple analysis things |
92 |
| -# function poles(s::LtiSystem) |
93 |
| -# warn("poles(s) not implemented for s::$(typeof(s))") |
94 |
| -# throw(MethodError(poles, Tuple{typeof(s)})) |
95 |
| -# end |
96 |
| -# |
97 |
| -# function zeros(s::LtiSystem) |
98 |
| -# warn("zeros(s) not implemented for s::$(typeof(s))") |
99 |
| -# throw(MethodError(zeros, Tuple{typeof(s)})) |
100 |
| -# end |
101 |
| -# |
102 |
| -# function isproper(s::LtiSystem) |
103 |
| -# warn("isproper(s) not implemented for s::$(typeof(s1))") |
104 |
| -# throw(MethodError(evalfr, Tuple{typeof(s),typeof(ω)})) |
105 |
| -# end |
106 |
| -# |
107 |
| -# # is strictly proper, better function name? |
108 |
| -# function isstrictlyproper(s::LtiSystem) |
109 |
| -# warn("issproper(s) not implemented for s::$(typeof(s1))") |
110 |
| -# throw(MethodError(evalfr, Tuple{typeof(s),typeof(ω)})) |
111 |
| -# end |
112 |
| -# |
113 |
| -# function tzeros(s::LtiSystem) |
114 |
| -# warn("tzeros(s) not implemented for s::$(typeof(s))") |
115 |
| -# throw(MethodError(tzeros, Tuple{typeof(s)})) |
116 |
| -# end |
117 |
| -# |
118 |
| -# function zpkdata(s::LtiSystem) |
119 |
| -# warn("zpkdata(s) not implemented for s::$(typeof(s))") |
120 |
| -# throw(MethodError(zpkdata, Tuple{typeof(s)})) |
121 |
| -# end |
122 |
| -# |
123 |
| -# function num(s::LtiSystem) |
124 |
| -# warn("num(s) not implemented for s::$(typeof(s))") |
125 |
| -# throw(MethodError(num, Tuple{typeof(s)})) |
126 |
| -# end |
127 |
| -# |
128 |
| -# function den(s::LtiSystem) |
129 |
| -# warn("denpoly(s) not implemented for s::$(typeof(s))") |
130 |
| -# throw(MethodError(denpoly, Tuple{typeof(s)})) |
131 |
| -# end |
132 |
| -# |
133 |
| -# # Constructors among different types |
134 |
| -# function lfd(s::LtiSystem) |
135 |
| -# warn("mfd(s) not implemented for s::$(typeof(s))") |
136 |
| -# throw(MethodError(mfd, Tuple{typeof(s)})) |
137 |
| -# end |
138 |
| -# |
139 |
| -# function rfd(s::LtiSystem) |
140 |
| -# warn("mfd(s) not implemented for s::$(typeof(s))") |
141 |
| -# throw(MethodError(mfd, Tuple{typeof(s)})) |
142 |
| -# end |
143 |
| -# |
144 |
| -# function ss(s::LtiSystem) |
145 |
| -# warn("ss(s) not implemented for s::$(typeof(s))") |
146 |
| -# throw(MethodError(ss, Tuple{typeof(s)})) |
147 |
| -# end |
148 |
| -# |
149 |
| -# function tf(s::LtiSystem) |
150 |
| -# warn("tf(s) not implemented for s::$(typeof(s))") |
151 |
| -# throw(MethodError(tf, Tuple{typeof(s)})) |
152 |
| -# end |
153 |
| - |
154 |
| -# Methods |
155 |
| -# function series{T1,T2,S}(s1::LtiSystem{Val{T1},Val{S}}, s2::LtiSystem{Val{T2},Val{S}}) |
156 |
| -# warn("series(s1, s2) not implemented for (s1::$(typeof(s1)), s2::$(typeof(s2)))") |
157 |
| -# throw(MethodError(series, Tuple{typeof(s1),typeof(s2)})) |
158 |
| -# end |
159 |
| -# |
160 |
| -# function series(s1::LtiSystem, s2::LtiSystem) |
161 |
| -# warn("series(s1, s2) cannot be defined for (s1::$(typeof(s1)), s2::$(typeof(s2)))") |
162 |
| -# throw(MethodError(series, Tuple{typeof(s1),typeof(s2)})) |
163 |
| -# end |
164 |
| -# |
165 |
| -# function parallel{T1,T2,S}(s1::LtiSystem{Val{T1},Val{S}}, s2::LtiSystem{Val{T2},Val{S}}) |
166 |
| -# warn("parallel(s1, s2) not implemented for (s1::$(typeof(s1)), s2::$(typeof(s2)))") |
167 |
| -# throw(MethodError(parallel, Tuple{typeof(s1),typeof(s2)})) |
168 |
| -# end |
169 |
| -# |
170 |
| -# function parallel(s1::LtiSystem, s2::LtiSystem) |
171 |
| -# warn("parallel(s1, s2) cannot be defined for (s1::$(typeof(s1)), s2::$(typeof(s2)))") |
172 |
| -# throw(MethodError(parallel, Tuple{typeof(s1),typeof(s2)})) |
173 |
| -# end |
174 |
| -# |
175 |
| -# function feedback{T1,T2,S}(s1::LtiSystem{Val{T1},Val{S}}, s2::LtiSystem{Val{T2},Val{S}}, |
176 |
| -# neg::Bool = true) |
177 |
| -# warn("feedback(s1, s2, neg) not implemented for (s1::$(typeof(s1)), s2::$(typeof(s2)), neg::$(typeof(neg)))") |
178 |
| -# throw(MethodError(feedback, Tuple{typeof(s1),typeof(s2),typeof(neg)})) |
179 |
| -# end |
180 |
| -# |
181 |
| -# function feedback(s1::LtiSystem, s2::LtiSystem, neg::Bool = true) |
182 |
| -# warn("feedback(s1, s2, neg) cannot be defined for (s1::$(typeof(s1)), s2::$(typeof(s2)), neg::$(typeof(neg)))") |
183 |
| -# throw(MethodError(feedback, Tuple{typeof(s1),typeof(s2),typeof(neg)})) |
184 |
| -# end |
185 |
| - |
186 |
| -function minreal(s::LtiSystem) |
187 |
| - warn("minreal(s) not implemented for s::$(typeof(s))") |
188 |
| - throw(MethodError(minreal, Tuple{typeof(s)})) |
189 |
| -end |
190 |
| - |
191 |
| -function freqresp(s::LtiSystem, ω) |
192 |
| - warn("freqresp(s, ω) not implemented for (s::$(typeof(s1)), ω::$(typeof(ω)))") |
193 |
| - throw(MethodError(freqresp, Tuple{typeof(s),typeof(ω)})) |
194 |
| -end |
| 22 | +samplingtime{T}(::LtiSystem{Val{T},Val{:disc}}) = zero(Float64) |
0 commit comments