Assume I have a five-sample time-domain sequence (none of the five samples are zero valued) and the time period between each pair of samples is one second. Measured in seconds, what is the time duration of my five-sample sequence?
-
1can you please change your title to actually describe the problem instead of your (obviously wrong, otherwise you'd have answered it yourself!) assessment of its difficulty? – Marcus Müller Nov 01 '20 at 21:17
-
1(and I don't ask that to annoy you, I think it's actually critical to be careful about the wording in how you state the problem) – Marcus Müller Nov 01 '20 at 21:18
-
@Marcus Muller. Per your insistence I've changed the title of my question, but my question's text remains unchanged. I hope you are able to help me by providing an answer to my question. – knight Nov 01 '20 at 21:39
-
What did you find so far, or do you have a guess? – Laurent Duval Nov 01 '20 at 21:53
-
1If one second elapses in one second, then how long does it take for five seconds to elapse? Hint: it is a perfectly linear relationship...I don't know how to help, but something is wrong here – Engineer Nov 01 '20 at 22:39
-
1@Laurant Duval. I have two ideas. Conjecture# 1: Subtracting the time instant of the first sample from the time instance of the fifth sample implies that the duration of my five-sample sequence is four seconds. Conjecture# 2: The notion that the frequency sample spacing of the DFT of my sequence is equal one over the my sequence's time duration implies that the duration of my five-sample sequence is five seconds. One of those conjectures is incorrect. I was hoping one of you experts here would help me. Is anyone on this web site willing to help me? – knight Nov 01 '20 at 22:46
-
@knight sorry, had to leave. I'm happy you changed the title, I really think it helps! – Marcus Müller Nov 02 '20 at 07:50
-
9The question is not "what is the time duration of an N-sample sequence?", but "what is the most useful definition of the time-duration of a sequence?". Take whatever definition you like and be clear about it. – Matt L. Nov 02 '20 at 07:52
-
@MattL. Do you have an example of a discrete time-limited sequence of N samples where other definitions of what the continuous time duration would be (other than N+1 and infinity) that would be useful? I am trying to think of others; the only two I can think of are N+1 and infinity assuming periodicity of the sequence. Most importantly what case would make the answer in being N useful? (I'm sure you can come up with one so a sincere question rather than doubt) – Dan Boschen Nov 03 '20 at 17:49
-
@DanBoschen: The point of my comment was that a discrete-time signal doesn't necessarily have a time duration associated with it. And IF we want to associate a time duration with it, then there can't be a single correct way to do this - as seems to be the conclusion when reading all the answers below. The definition you gave is no doubt useful and practical in many cases. – Matt L. Nov 04 '20 at 08:02
-
@DanBoschen: I don't know if there are other more useful definitions for certain applications, but the point is that we have to come up with a definition instead of being able to use some intrinsic time duration of a discrete signal. And that definition is in a way arbitrary (even though there are certainly some that are more useful than others). – Matt L. Nov 04 '20 at 08:03
-
@MattL. Yes totally agree--- consistent with the fact that there isn't one "right" way to map between the continuous to discrete time domain, which this association of a duration of time attributed to a sample seems to imply. So your comment that the question should be "what is most useful" is most cogent. Even though it is short, you should provide that as an additional answer expanded with what is most useful in most cases; it would be the best answer I believe given the question and that important point. – Dan Boschen Nov 04 '20 at 14:27
9 Answers
The following graphic should clear up why a useful answer is 5 seconds, consistent with conversions between the discrete-time and continuous-time domains. A good example of this are discrete time approximations to continuous time integration or differentiation where the inclusion of $\Delta T$ (sample period) is made. With all such approximations, the time duration attributed to each sample is one sample interval. For the Forward Euler approximation specifically, each sample covers the time duration up to and not including the next sample. Such as in the first graphic the time duration for a sample at $t=0$ is one sample interval of one second; up to and not including the next sample at $t=1$ when sampled at one sample per second, with a total time duration for the one sample as one second.
The bottom figure then shows how this would apply to five samples starting at $t=0$ resulting in a total time duration of 5 seconds.
The plot below shows the Forward Euler discrete-time approximation for the integration of a continuous time waveform $x(t)$, which would be given as follows in the formula below and demonstrated in the graphic, best showing how each sample carries the time duration of the sample period (and as David has pointed out in the comments, this equally represents the zero-order hold approach in the output of a typical Digital to Analog converter):
$$\int_0^{NT}x(t)dt \approx \sum_{n=0}^{N-1}x[n]T$$
The actual range of time used for each sample is specific to the analog-digital translation approach used, but would cover one sample duration in all cases, leading to a total duration of 5 seconds for the OP's case.
- 50,942
- 2
- 57
- 135
By the way, "measure" isn't quite the right term here: you're not measuring a physical quantity, but that would be nitpicking; a sequence doesn't have duration. (You have another question that also touches upon that, and I always found it helpful to remind myself that a sequence like 0.1, 0.3, -0.2, 0.0, 1.0 has no duration, as it's just a bunch of numbers in order. Duration is an attribute we infer from it representing something, which usually doesn't matter for the math we do on the sequence.)
The continuous-time signal it represents has a duration! So, let's look at that.
So, first of all, we need to make an assumption: your signal is bandwidth-limited – otherwise sampling it had made no sense.
Then: we need to assume that it's periodically repeating! Otherwise, you don't get to claim that your DFT is representative of your continuous signal's spectrum (only periodic signals have line spectra).
And then you're right, your signal repeats every 5 sample periods.
If we take away the assumption that the underlying time-continuous signal is periodic, we end up in a hard situation: We have a signal that is strictly bandlimited, so it can't be finite in duration!
A good reminder of that is the reconstruction theorem, where we interpolate all the samples we have with sinc. The nice thing about that is that each sinc is zero at all but one sample instant (where it takes the value of the sample).
The less nice thing about that is that a sinc never truly stays zero. (Look at Dan Boschen's integral figure and replace the rectangles with sincs centered at each sample instant. When do the sincs disappear? Never!)
And thus I think, the real answer (applying Occam's razor of using as few assumptions as necessary) is that
- you have no signal duration without interpreting your sequence as representation of something else
- if you do that interpretation of the sequence as samples from a bandlimited signal, then the signal that effected these samples is infinite in duration,
- if you do that interpretation of the sequence as samples from a bandlimited, periodic signal, then only periods of five sample instants make sense. (and it's still infinite)
So, in any case, if we assign an attribute "length" to this sequence, strictly speaking, it'd be infinite.
- 8,912
- 5
- 23
- 74
- 30,525
- 4
- 34
- 58
-
1I thank all of you guys for your thoughts regarding my "not so simple after all" question. – knight Nov 02 '20 at 12:44
-
1@knight If you seek a deeper perspective on the DFT, I can recommend these -- two posts. Good luck. – OverLordGoldDragon Nov 02 '20 at 12:48
-
@OverLordGoldDragon you must have misread my answer: I don't claim the DFT assumes anything. The DFT doesn't care about the continuous signal at all, it's just a bijective finite-dimensional vector space base transform. What cares is the interpretation as spectrum, and as said, that only works if you assume the underlying signal to be periodic. Otherwise, the IDFT of that shaped with sincs don't combine to the same signal as was sampled (which is what these two posts are about :) ) – Marcus Müller Nov 02 '20 at 14:02
-
Whoever claimed that the DFT is representative of the signal's spectrum? The OP has not mentioned the DFT (at least not in the versions of the question that I have seen; I haven't checked the edit history). – Dilip Sarwate Nov 02 '20 at 17:33
-
@DilipSarwate knight's DFT comment: https://dsp.stackexchange.com/questions/71181/how-do-i-measure-the-time-duration-of-a-finite-length-discrete-sequence/71188?noredirect=1#comment148924_71181 – Marcus Müller Nov 02 '20 at 17:46
-
Hm, fair, but that should be made explicit in the same sentence; I suggested an edit. Remember it may not be easy for a newcomer to connect the dots across different paragraphs and may infer "input must be periodic or DFT breaks" – OverLordGoldDragon Nov 02 '20 at 18:27
The OP's query and his response to Laurent Duval's comment is very reasonable and the OP's question should not be closed. See the answer by Richard Lyons (author of the well-regarded book Understanding Digital Signal Processing) to this question. Richard now concludes that the OP's second choice (that the signal duration of a 5-sample discrete-time signal with one sample per second is 5 seconds) is correct, and that the notion that the first and last samples are separated by only 4 seconds and hence the signal duration is 4 seconds is not appropriate.
- 20,349
- 4
- 48
- 94
-
What's the time between two (second) tics of a clock ? 1 second or two seconds? If you consider each sampling process as a tic then the time-between 5 tics is 4 seconds. But if you ask how many seconds 5 tics make?, most typically you mean 5 seconds ;-)) – Fat32 Nov 01 '20 at 23:42
-
1
-
4Indeed. I disagree – the sequence strictly speaking has no duration (has a number of elements, OK, but that's not a duration). The thing that has a duration is the cont.-time signal it represents, but when you think of reconstruction, the signal generated by these five samples, namely the sum of five shifted, weighted sincs, then that signal's support is far from five sample periods; it's infinite. – Marcus Müller Nov 02 '20 at 08:08
-
@Fat32 well, I think your questiony-comment was pretty on point, and only OP can answer it: whether they meant "the duration of signal that influenced these five samples", "the time for which these five samples are 'valid'", or "the time between these five sample instants" yield three different answers :) – Marcus Müller Nov 02 '20 at 11:21
-
@MarcusMüller Shushhh ! Do not threaten the status-quo of DSP experts with such questions.... ;-)) – Fat32 Nov 02 '20 at 11:27
-
2
I hope this is clear and helpful.
Given a continuous-time signal $x_a(t)$, if you perform an ideal impulse-train modulation based uniform sampling of it by a sampling period of $T_s$ seconds as indicated by:
$$x[n] = x_a(t_n) = x_a(n T_s) $$
and obtain $N$ such samples, then the duration of your observation is given by :
$$ \Delta T = (N-1)\cdot T_s $$
The time-stamp of the first sample $x[0]$ will be at $t_0 = 0\cdot T_s =0$ and the time-stamp of the last sample $x[N-1]$will be at $t_{N-1} = (N-1)\cdot T_s$.
Nevertheless, in some applications (such as sample rate conversion) it's customary to call the duration as $\Delta T = N \cdot T_s$, by adding one more period $T_s$ that spans after the last taken sample $x[N-1]$ and the next un-taken sample at time $t_N = N \cdot T_s$.
- 28,152
- 3
- 24
- 50
-
The issue with taking the time duration as $(N-1)T_s$ is that the concatenation of sequences of $N$ samples (and so, duration $(N-1)T_s$) and $M$ samples (duration $(M-1)T_s$) has duration $$(N+M-1)T_s \neq (N-1)T_s + (M-1)T_s,$$ that is, the durations don't add as one should expect. This difficulty does not arise if the duration is defined as # if samples times sampling interval. – Dilip Sarwate Nov 01 '20 at 23:43
-
@DilipSarwate Yes but the one who is making the concatanation should be aware enough of the fact that boundary samples are not touching ;i.e, There's one period gap between each boundary sample of the concatanated blocks, and the very last sample period should also be discluded... – Fat32 Nov 01 '20 at 23:46
-
The key question here is: what does the continous signal do before and after the taken samples. We know that $x(nT) = 0$ if n is an integer and not $[0,1,2,3,4]$. However that does NOT mean that $x(t), t<0$ or $x(t)=0,t>4$. Quite the opposite, if x(t) is bandlimited it's non zero everywhere EXCEPT $t=nT$ – Hilmar Nov 02 '20 at 15:22
-
I throw another on in the mix:
The question is oddly worded but my interpretation is "I have a 5 point discrete sequence sampled at $1Hz$, what's the length of the corresponding continuous time domain signal in seconds".
First we need to define what we mean by "corresponding". In order for the sequence to completely capture a continuous signal, this signal must be bandlimited. So if we require our sequence to represent a complete description of the corresponding continuous signal, the length of that signal must be infinite. (Since all band limited signals have inifinite lengths)
If we allow for aliasing, then the length is "whatever you want it to be". There is an inifite number of continuous signals that would result in our original sequence when sampled. In other words, for any given time length you can construct a continuous signal that will sample as our original sequence.
EDIT:
So it seems like I misinterpreted the question. OP wants to know ""what is the time duration of my five-sample sequence?"
The answer to this is: it doesn't have any. The length is $5$ (no units) and that's that.
In order to define time length as a physcial quantity you need to create a physical manifestation of that discrete sequence. In other words, you need to run it through a D/A converter and then you can measure actual physical time. The result of this measurement will be dependent on the implementationd details of the D/A. D/A create compromise between "time smearing" and "aliasing" An "ideal" D/A converter would create a signal that's infinitely long, but of course, that's impossible and impractical.
We are having some fun philosphical discussion on this topic with fairly different opinions. Now that would be all futile, if you could simply measure it, but it turns out there is no well defined "time length" that's measurable and would provide the definitive answer.
- 44,604
- 1
- 32
- 63
-
1My question did NOT ask "what's the length of the corresponding continuous time domain signal in seconds? My question asked "what is the time duration of my five-sample sequence?" – knight Nov 02 '20 at 18:24
-
@knight Mind that the dots themselves have no "duration", they're data - so any talk of duration is really asking "what duration do these samples represent?", and answer will vary depending on what exactly you seek. – OverLordGoldDragon Nov 02 '20 at 18:33
-
1@Hilmar- Even with aliasing, how does that change the time duration? It would still be 5 seconds of the underlying waveform regardless, would it not? – Dan Boschen Nov 02 '20 at 18:49
-
(specific to the duration we use for the samples we select from the infinitely long, if bandlimited, waveform) – Dan Boschen Nov 02 '20 at 21:21
-
@DanBoschen: with aliasing you can make it whatever you want to, although not shorter than 4 seconds. It's easy enough to come up with a few different examples that have vastly different length in continous time but would still just result in 5 non-zero samples when discretized. Without aliasing, the underlying waveform must be inifinetly long. In practice there is always a compromise: I allow for a little time smear and a little alaising to make it all work "good enough" – Hilmar Nov 02 '20 at 21:34
-
I'm thinking that with aliasing or not for any definition we decide on to use for the duration of time that we sampled (not the underlying waveform) it would come up to be the same duration (meaning aliasing isn't a factor). Not disagreeing yet, just trying to find a counter example (as I have my finger on the upvote button if I can think of one) – Dan Boschen Nov 02 '20 at 21:42
-
@DanBoschen Eventhough the question was phrased with "time duration of a sequence", I think we should all interpret it as the "time duration of sampling" and this has nothing to do with whether the signal was undersampled or oversampled or bandlimited or not. It's determined by the sampling device (its sampling period) and not about the signal characteristics. The discrepancy is about the last sample (or the first may also as according to Laurent). I think people make fun of this. – Fat32 Nov 02 '20 at 23:40
-
1
I would answer $4+\epsilon$ seconds. Because Richard Hamming, one of my (our?) godfather is credited with this "The purpose of computing is insight, not numbers". As commented by many, precise definitions and usefulness are necessary.
Before explanations, let me play on terms, and propose a first (silly?) answer. Thus, my first answer is:
$$\frac{1}{24}\; \textrm{second}^4\,.$$
Yes, in seconds to the fourth power. Indeed, if the time period between each pair of samples is one second, the simplest geometrical structure allowing five points to be equidistant is the pentatope, or Four-Simplex. This is the simplest polytope in a four-dimensional space. In 1D, two points can be separated by one second. For three points, one needs to place a equilateral triangle in the plane. With four points, a tetrahedron, and so on. The hypervolume of a pentatope with vertices $(0,0,0,0)$ ,$(a,0,0,0)$ ,$(0,b,0,0)$ ,$(0,0,c,0)$ ,$(0,0,0,d)$ is $\frac{abcd}{24}$, see Hypervolume of the 4-simplex. This would suppose that we live in a time-space with at least four time dimensions, a bit too much for the stability of the laws of the Universe. This was meant to emphasize on how far people could go on things as "natural" as each pair.
Going back to 1D. The question is about a "five-sample time-domain sequence". To me, not a signal per se, while it might represent some signal, continuous or discrete, whose acquisition method is not specified (yet). The mention of time in second can be misleading, only providing a unit to the $x$-axis. Let us rely on the notions of support from mathematics. As you can see, people tried to define unambiguous definitions, and there are many. As a pure sequence, the set-theoretic support of the sequence is finite. The closed support (intersection of all closed sets that contain the set-theoretic support) and compact support would be the same interval $[0,4]$ in seconds. Its essential support would be of length $0$.
For signal processing, I understand the idea that each sample is related to some interval of one second (hence the 5-second length answer). And I voted for Dilip Sarwate's answer, which means that this question is still triggering my mind. However, after a second thought, I have no idea about the way the original signal was sampled: maybe the last sample was averaged over 2 seconds, while the first one had "instantaneous capture". The fact that "The time period between [consecutive] samples is one second" may be a choice of storage, an artifact, a result for compresive sensing, etc.
In other words, I don't know if some hypothetical signal was regularly sampled. So with minimal hypotheses, another side of the Ockham razor evoked elsewhere, I would consider that if it was indeed sampled in the real world, it can be imperfect, because of integration time, or jitter, and I'd allow some uncertainty $\epsilon \ge 0$. Hence, my present answer is:
$$ 4+\epsilon\,.$$
on my most solid grounds. At least, something to discuss openly.
- 31,850
- 3
- 33
- 101
-
1Laurent you finally turned the problem into a Sunday Puzzle ! ;-) You know such a problem makes absolutely no sense without clearly stating which sampling method was used to obtain those samples. And if it's not made explicit, then it's almost a law to assume single channel uniform sampling.. ;-) The problem is about the last sample. Whether it's timing is included or not. My answer clearly describes what happens if you include or disclude the last sample interval. But nobody can give an answer to which one to accept as the definition, as there's no correct answer to that question. – Fat32 Nov 02 '20 at 22:51
-
1Mmmh, are you sure that the problem is NOT about the first sample? ;-) – Laurent Duval Nov 02 '20 at 22:54
-
1
I've pondered a better take on this; "what is the duration?" can ask two separate questions:
- For how long have we been sampling?
- How much time's worth of information is contained in our signal?
I'd argue the answers to these are, unambiguously, $(N - 1)/f_s$ and $N/f_s$, respectively. To interpret either, I'll refer to following sampling times: $t=[0, .1, .2, .3, .4, .5, .6, .7, .8, .9] \text{sec}$.
1. For how long have we been sampling?
We begin with first sample. At that time, no time has passed, else we wouldn't be "at that time" but at later time, so we've been sampling for a total of 0 sec. At next sample, 0.1 sec have passed since we began sampling - so we've been sampling for 0.1 sec. And so on: total duration = 0.9 sec.
2. How much time's worth of information is contained in the signal?
The answer to this is either 0 sec or 1 sec. Refer to other answers, but basically there's agreement that the sequence is representative of physical source process in one of below senses:
Black arrows are values of observations we draw from a system (purple), and blue lines (white gaps for clarity) are time intervals spanned by observations.
Which is "better", A or B? Well, with B, we're saying the observation at $t=.1$ "speaks for" the process for $t=[.1, .2)$, where with A we're saying it represents $t=[.05, .15)$.
- Note for $t=.3$, B fares better, since values within $[.3, .4)$ are much closer on average to value at $t=.3$, than values within $[.25, .45)$. If we shifted the whole process left by $.05 \text{sec}$, A fares better. Point is, we just defined "better" as "more representative", which we measured as "less variance".
- B is more akin to "speaking for the future" than A is, and "reverse B" where blue line is drawn all the way left is guilty of "speaking for past". In this sense, A is the optimal scheme in localizing observations.
Example 1: take an "instant thermometer" and sample a lake's temperature every 30 minutes, 6 times.
- For how long have we been sampling? We started at 6AM, finished at 8:30AM --> 2.5 hours.
- How much time's worth of information is contained in our data? If noone's unloading lava nearby, temperature will change slowly over time, so every sample is representative of 30 minutes --> 3 hours.
Example 2: suppose we count the number of people at a restaurant once a day at the same hour, 6 times.
Sampling duration: 5 days.
Do we have 6 days' worth of "number of people present in restaurant" information? Hardly; the number of people can vary wildly depending on time of day and day of week. Large variance. Instead, we can say that each of our observations reasonably captures the number of people over 1 hour span - giving us 6 hours' worth data (non-contiguous).
So more generally, we can say that "duration" of a sequence in terms of information contained is $N\cdot \Delta t_e$, where $\Delta t_e = $ "effective time represented by each sample". It can be less than, or equal to, but not greater than $f_s^{-1}$, as that'd imply that a sample at $t=0.1$ "speaks for" a sample at $t=0.2$ more than that sample itself. So $f_s^{-1}$ is maximum represented duration.
Whatever the case, we associate a "representative time" to each individual observation, ultimately doing $\cdot N$ rather than $\cdot (N - 1)$.
... or not. We may have a scenario where it makes more sense to say samples represent only what's between them - in which case we're back to $(N-1)$. The point of this answer is more to illustrate what "depends on definition" can mean (but still that $\cdot N$ makes more sense for most purposes) - which hopefully is conveyed.
- 8,912
- 5
- 23
- 74
-
that little notch between the ".2" and ".3" samples is indicative of an inadequately-sampled function. – robert bristow-johnson Nov 22 '20 at 20:19
-
@robertbristow-johnson Indeed; point was illustrating the "observation as representative of time" idea. I went with detail here in what I insufficiently described in my first answer, namely with articulating "duration of observation" vs "represented duration". – OverLordGoldDragon Nov 22 '20 at 20:25
Discrete Fourier Transform says it's A!
I derived the closed form solution for DFT of a sine, which says that the correct continuous-time expression for
$$ x[n] = \cos(2\pi f_0 \mathbf{t}[n]), \\ \mathbf{t} = [0, 1, ..., N - 1] \cdot s,\ s = \text{sampling period} $$
is
$$ x(t) = \Pi\left(\frac{t - (T - s)/2}{T}\right) \cos(2\pi f_0 t) $$
where $T = Ns$ is the duration, and
$$ \Pi(t) = \begin{cases} 1,\ -1/2 \leq t \leq 1/2 \\ 0,\ \text{otherwise} \end{cases} $$
is a rectangular window, which in this case is
$$ \Pi\left(\frac{t - (T - s)/2}{T}\right) \begin{cases} 1,\ -s/2 \leq t \leq T - s/2 \\ 0,\ \text{otherwise} \end{cases} $$
It spans half a sampling interval to left of first sample, and half to right of last sample!
This concurs with my other answer. It is, however, not an absolute - other definitions can be more useful depending on context. But if we're interested in how the DFT "sees" the sampling of a continuous function, this is it.
- 8,912
- 5
- 23
- 74
It's $N/f_s$. Because consider what happens if it's $(N-1)/f_s$ instead; take a sequence $x$ of 6 samples, sampling once per second. Going by latter, defining "duration" as that between samples, we get
Now what is half the "duration" of $x$? Well, take half the sequence and measure the same:
Bad. If on the other hand we define duration as intervals midpointed by samples:
Good to go. This definition is also better grounded physically; suppose we wish to integrate. Doing so, we'd draw Riemann shapes (e.g. rectangles) in the discrete case, but regardless of shape, we'd have $N$ bins, so if finding e.g. average velocity, the physical interval spanned by integration would be $N/f_s$.
To be clear, this is largely a matter of definition, as a case can be made the other way; above's meant to show ways in which $N/f_s$ is more sensible.
- 8,912
- 5
- 23
- 74
-
2I don’t completely follow your logic that taking midpoints allows you to then take half the samples? (What do you get with 5 samples)? But agree that it is a matter of definition of how we want to relate continuous time to discrete time and what we may already know about the physical process (causal? Etc) – Dan Boschen Nov 02 '20 at 13:31
-
1Why do you have 5 samples in the first example and 6 samples in the second? How would mid-points work with 5 samples? I also don't really see why halving the sequence length is more sensible. Why 1/2 why not 1/3, 1/4, 1/10 etc? – David Nov 02 '20 at 14:38
-
@DanBoschen Arguably neither definition handles half of an odd sequence unless we loosen up "half" a bit and permit drawing half a sample with half the duration; then midpoint permits half the blue line, while "between" still insists on an integral number, so $N/f_s$ still wins. But at least in one of two cases (even) $N/f_s$ clearly wins, also in integration sense. – OverLordGoldDragon Nov 02 '20 at 18:20
-
@David 6 samples both cases, and see previous comment. On 1/3, 1/4, we'd just need more samples, I used a minimal example. The stronger case overall is integration – OverLordGoldDragon Nov 02 '20 at 18:22
-
@DanBoschen Another interpretation of the midpoint construction I omitted from answer is of the most base interpolant, i.e. mean, of C.T. signal, of adjacent values. Also when we sample an analog it makes more sense to say the sample is at center of temporal locality rather than some edge. – OverLordGoldDragon Nov 02 '20 at 18:58
-
Right that would be a much better explanation than the logic of taking half the samples. It is consistent with that is the difference between Forward Euler, Backward Euler and trapezoidal rules for integral-differential approximations-- there is no one answer and all have their advantages. They all result in a 5 second interpretation in answer to the OP's question. – Dan Boschen Nov 02 '20 at 19:14
-
@OverLordGoldDragon Sorry, I missed counted and probably had Dan comment in my mind. It isn't really clear what you're trying to do i.e. point out the inconsistency with $(N-1)/f_s$. So rather than saying "what is half the duration" ask "What is the duration when we have half the number of samples?" – David Nov 02 '20 at 19:33
-
@David Half the sequence length should have half the duration, is my point - did you interpret it somehow differently? Also fixed the $-1$, thanks. – OverLordGoldDragon Nov 02 '20 at 21:18
-
1//"If on the other hand we define duration as intervals midpointed by samples..."// --------- i haven't always been on board with Over's answers, but this is the correct way of looking at it. Dan's answer is correct in the length, but it's more correct to center the precise frequencies of the DFT bin in the center of the adjacent and contiguous frequency bands that span from -Nyquist to +Nyquist. if $N$ is even, you have to split the $\frac{N}2$ bin in half. – robert bristow-johnson Nov 22 '20 at 20:16


