|
From: | Doug Stewart |
Subject: | Re: test this in matlab for my please |
Date: | Fri, 15 Jul 2016 11:06:27 -0400 |
On Fri, Jul 15, 2016 at 5:50 AM, Doug Stewart <address@hidden> wrote:On Thu, Jul 14, 2016 at 2:56 PM, Ozzy Lash <address@hidden> wrote:Now Matlabe gives0.1 z
ans =
----- This is wrong!!!
z - 1
which has the zero at the origin but has a gain of 1/10th of what it should!Matlab the does a correction factor of 1/T when they plot it so that it comes out correct,but this does not help anyone who just wants the formula not the plot.I think Matlab uses this convention for the impulse response because they are using the dirac delta function in the continous domain and the kronecker delta in the discrete time domain. The dirac delta has area 1 under the curve, while the kronecker delta has an area of 1/fs under the curve (assuming a zero order hold, and defining the kronecker delta to have value 1 at index 0).I think I have seen books teach this either the way Matlab is doing it, or by assuming a fs scale factor on the delta function that they use. I think in either case, once you get past the early chapters, you just forget about any scale factor.BillThanks for the clarification.I can live with the 1/Fs factor.But I have one question.when i do [ 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0...] in octave, didi make a kronecker delta or a dirac delta ?The bigger problem is the fact that the numerator and denominator are wrong.For the last example I did all the math by hand on paper, and found that Matlabagreed with my work and not with impinvar().Doug--
that would be the kronecker delta. (Actually I think I should have said unit impulse function, the kroneker delta is a function of 2 variables where it is 1 when they are equal and 0 otherwise, whereas the unit impulse is a function of 1 variable that is 1 at 0 and 0 elsewhere). The dirac delta function is effectively infinite at 0 and 0 elsewhere, with the constraint that the integral is 1, so it is not really possible to represent it in octave/matlab/other discrete time environment.If the difference is more than a scale factor, then I'm not sure what would be going on.Bill
_
[Prev in Thread] | Current Thread | [Next in Thread] |