Can sampling rate be a floating point number?Visualising data rate as square waves (Converting bits per...
Markov-chain sentence generator in Python
What is my malfunctioning AI harvesting from humans?
Can a PC use the Levitate spell to avoid movement speed reduction from exhaustion?
Understanding this peak detector circuit
How can God warn people of the upcoming rapture without disrupting society?
Why are Tucker and Malcolm not dead?
How to reduce Sinas Chinam
Why is there a large performance impact when looping over an array over 240 elements?
Is there a command to install basic applications on Ubuntu 16.04?
80's/90's superhero cartoon with a man on fire and a man who made ice runways like Frozone
How does "Te vas a cansar" mean "You're going to get tired"?
visible indication that a cell is not evaluatable
Breadcrumb history decision
How do some PhD students get 10+ papers? Is that what I need for landing good faculty position?
When were the tantalum capacitors first used in computing?
Is there a standardised way to check fake news?
What is a good class if we remove subclasses?
Can "être sur" mean "to be about" ?
Why did Gandalf use a sword against the Balrog?
What gave Harry Potter the idea of writing in Tom Riddle's diary?
Why isn’t SHA-3 in wider use?
What does the phrase "pull off sick wheelies and flips" mean here?
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
is this F 6'9 chord a figured bass or a chord extension?
Can sampling rate be a floating point number?
Visualising data rate as square waves (Converting bits per second into hertz) for selecting ADC sampling frequencyWhat are the advantages of recursive prony?Karplus Strong - getting a pluck of particular frequencySampling Signal using microcontrollerPerforming FFT at low frequencies but high resolution?Number of samples (n) and number of data points (N)Why fake harmonics appear when using weighting windows?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
$begingroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
New contributor
$endgroup$
|
show 3 more comments
$begingroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
New contributor
$endgroup$
2
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
18 hours ago
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
18 hours ago
3
$begingroup$
I plan on using a sample rate of exactly 45000000/11 Hz in a future project. Can't even use a float to represent that.
$endgroup$
– pipe
10 hours ago
1
$begingroup$
@ThomasWeller Maybe OP understands it even if you don't? As you can see from the answers, it can be any real value, including arbitrary rationals.
$endgroup$
– pipe
7 hours ago
4
$begingroup$
@ThomasWeller, I pretty sure pipe's point is that sample rates and the binary representation of floating point numbers are 2.0 unrelated concepts.
$endgroup$
– Glen Yates
6 hours ago
|
show 3 more comments
$begingroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
New contributor
$endgroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
frequency signal-processing sampling
New contributor
New contributor
edited 18 hours ago
jusaca
2,5268 silver badges30 bronze badges
2,5268 silver badges30 bronze badges
New contributor
asked 19 hours ago
Ron HowardRon Howard
282 bronze badges
282 bronze badges
New contributor
New contributor
2
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
18 hours ago
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
18 hours ago
3
$begingroup$
I plan on using a sample rate of exactly 45000000/11 Hz in a future project. Can't even use a float to represent that.
$endgroup$
– pipe
10 hours ago
1
$begingroup$
@ThomasWeller Maybe OP understands it even if you don't? As you can see from the answers, it can be any real value, including arbitrary rationals.
$endgroup$
– pipe
7 hours ago
4
$begingroup$
@ThomasWeller, I pretty sure pipe's point is that sample rates and the binary representation of floating point numbers are 2.0 unrelated concepts.
$endgroup$
– Glen Yates
6 hours ago
|
show 3 more comments
2
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
18 hours ago
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
18 hours ago
3
$begingroup$
I plan on using a sample rate of exactly 45000000/11 Hz in a future project. Can't even use a float to represent that.
$endgroup$
– pipe
10 hours ago
1
$begingroup$
@ThomasWeller Maybe OP understands it even if you don't? As you can see from the answers, it can be any real value, including arbitrary rationals.
$endgroup$
– pipe
7 hours ago
4
$begingroup$
@ThomasWeller, I pretty sure pipe's point is that sample rates and the binary representation of floating point numbers are 2.0 unrelated concepts.
$endgroup$
– Glen Yates
6 hours ago
2
2
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
18 hours ago
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
18 hours ago
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
18 hours ago
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
18 hours ago
3
3
$begingroup$
I plan on using a sample rate of exactly 45000000/11 Hz in a future project. Can't even use a float to represent that.
$endgroup$
– pipe
10 hours ago
$begingroup$
I plan on using a sample rate of exactly 45000000/11 Hz in a future project. Can't even use a float to represent that.
$endgroup$
– pipe
10 hours ago
1
1
$begingroup$
@ThomasWeller Maybe OP understands it even if you don't? As you can see from the answers, it can be any real value, including arbitrary rationals.
$endgroup$
– pipe
7 hours ago
$begingroup$
@ThomasWeller Maybe OP understands it even if you don't? As you can see from the answers, it can be any real value, including arbitrary rationals.
$endgroup$
– pipe
7 hours ago
4
4
$begingroup$
@ThomasWeller, I pretty sure pipe's point is that sample rates and the binary representation of floating point numbers are 2.0 unrelated concepts.
$endgroup$
– Glen Yates
6 hours ago
$begingroup$
@ThomasWeller, I pretty sure pipe's point is that sample rates and the binary representation of floating point numbers are 2.0 unrelated concepts.
$endgroup$
– Glen Yates
6 hours ago
|
show 3 more comments
3 Answers
3
active
oldest
votes
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
add a comment |
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
add a comment |
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac{1}{15.5}s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("schematics", function () {
StackExchange.schematics.init();
});
}, "cicuitlab");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "135"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Ron Howard is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f452566%2fcan-sampling-rate-be-a-floating-point-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
add a comment |
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
add a comment |
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
edited 6 hours ago
answered 18 hours ago
joribamajoribama
1,2112 silver badges12 bronze badges
1,2112 silver badges12 bronze badges
add a comment |
add a comment |
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
add a comment |
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
add a comment |
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
answered 18 hours ago
Neil_UKNeil_UK
85.5k2 gold badges86 silver badges197 bronze badges
85.5k2 gold badges86 silver badges197 bronze badges
add a comment |
add a comment |
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac{1}{15.5}s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
add a comment |
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac{1}{15.5}s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
add a comment |
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac{1}{15.5}s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac{1}{15.5}s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
edited 18 hours ago
answered 18 hours ago
jusacajusaca
2,5268 silver badges30 bronze badges
2,5268 silver badges30 bronze badges
add a comment |
add a comment |
Ron Howard is a new contributor. Be nice, and check out our Code of Conduct.
Ron Howard is a new contributor. Be nice, and check out our Code of Conduct.
Ron Howard is a new contributor. Be nice, and check out our Code of Conduct.
Ron Howard is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Electrical Engineering Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f452566%2fcan-sampling-rate-be-a-floating-point-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
18 hours ago
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
18 hours ago
3
$begingroup$
I plan on using a sample rate of exactly 45000000/11 Hz in a future project. Can't even use a float to represent that.
$endgroup$
– pipe
10 hours ago
1
$begingroup$
@ThomasWeller Maybe OP understands it even if you don't? As you can see from the answers, it can be any real value, including arbitrary rationals.
$endgroup$
– pipe
7 hours ago
4
$begingroup$
@ThomasWeller, I pretty sure pipe's point is that sample rates and the binary representation of floating point numbers are 2.0 unrelated concepts.
$endgroup$
– Glen Yates
6 hours ago