Commit bdb87e9d authored by Hafiz Emin Kosar's avatar Hafiz Emin Kosar
Browse files

- show error message if partial fraction was not possible in z-transform

parent a428e8cf
......@@ -126,6 +126,12 @@ class zPlot():
self.handles['axh'].set_ylabel(r'$\uparrow h(n)$')
self.handles['containerh'] = ient_stem(self.handles['axh'], self.n, self.n)
ient_axis(self.handles['axh'])
self.pbzErrortxt = self.handles['axh'].text(-13, .0125,
'Zählergrad größer als Nennergrad. \nKeine Partialbruchzerlegung möglich!',
fontsize=12, color='rot', visible=False, bbox=ient_wbbox)
self.handles['axH'] = plt.subplot(gs[1, 1])
self.handles['axH'].set_title('Übertragungsfunktion', fontsize='12')
self.handles['axH'].set_xlabel(r'$\rightarrow f$')
......@@ -415,7 +421,12 @@ class zPlot():
# update n-domain
h_n = np.real(ient_iz_hn(self.n, self.H0, poles, zeroes, poles_order, zeroes_order, roc))
ient_stem_set_ydata(self.handles['containerh'], np.real(h_n))
ient_update_ylim(self.handles['axh'], h_n, 0.19, ymax=1e5)
if not np.isnan(h_n[0]):
ient_update_ylim(self.handles['axh'], h_n, 0.19, ymax=1e5)
self.pbzErrortxt.set_visible(False)
else:
self.pbzErrortxt.set_visible(True)
ient_update_ylim(self.handles['axh'], np.zeros(self.n.shape), 0.19, ymax=1e5)
self.systemIsStable = np.min(roc) < 1 < np.max(roc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment