Questions tagged [sampling]

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. In statistics, sampling is the selection of a subset of individuals from within a statistical population to estimate characteristics of the whole population.

This tag should be used for questions related to programming solutions related to sampling.

Sampling can be done for functions varying in space, time, or any other dimension, and similar results are obtained in two or more dimensions. More information in Wikipedia - sampling (signal processing).

For statistical sampling, see Wikipedia - sampling (statistics) for more.

1593 questions
0
votes
1 answer

how to do sampling without knowing the signal frequency in matlab

I am currently doing research on nonuniform sampling method and use it to detect frequency of the signal. I want to simulate this situation using Matlab. t = 0:1/2500:.25; freq_cont = 3600; cont_signal = cos(2*pi*freq_cont*t); %COntinous time signal…
0
votes
1 answer

Discretize a continuous signal obtained by accelerometer

I have a signal vector of size 1-by-1155 obtained by an accelerometer sensor. An example of values in this vector is [0.5301 1.0039 1.4751 1.520]. I also have the time vector (size 1-by-983) which is the time duration of gathering the data measured…
Ckjh
  • 1
0
votes
3 answers

Android: How to increase Accelerometer Sampling Rate?

I am currently using Java API to get accelerometer values in 5Hz, which is below my requirements. I want to achieve at least 50Hz. Is there any way to increase the sampling rate of accelerometer? Regards
yildirim
  • 316
  • 7
  • 14
0
votes
2 answers

How to sample from a dataset based on dataset size criteria

I have the following dataset of dim 22784 X 18 head(MS.DATA.IN.NUM.ZeroVar) X x1 x2 x3 x4 x5 x6 x7 x8 x9 1 1 15512 0.4608690 0.0492522 0.2264698 0.1498266 0.7528365 0.0100567 0.5797286…
Nishant
  • 1,063
  • 13
  • 40
0
votes
1 answer

Generating the dataframe objects that are produced during jackknife sampling

This post has been editted to more accurately describe the situation. I am utilising a form of jackknife sampling for my work. The jackknifed data will be used for calibration of a model, and the unused data will be used for validation. Rather than…
Quinn
  • 419
  • 1
  • 5
  • 21
0
votes
2 answers

java: sampleoutofbounds exception

I am writing a program for school that reduces noise in a sound file. So far i have written this code which I think takes n number of samples before a set one and n after and then averages the two. My problem is that everytime my second for loop…
Cheesegraterr
  • 517
  • 3
  • 14
  • 26
0
votes
1 answer

Randomly selected data matrics and linear mixture in R

My intention is to generate a set of new data from two datasets by different proportions. Dataset A looks like this V1 V2 V3 17.73401882 15.57104835 38.38786527 17.46926296 15.51123547 38.15194112 17.7728391 15.57638409…
Gary Hsu
  • 113
  • 8
0
votes
2 answers

How to run the Kennard-Stone algorithm with a multilayer raster?

I am dealing with a spatial dataset that I need to divide into a training and a validation subset. To be specific, I have a raster with 31 bands; I need to use all of them as parameters for the division of the dataset into the two subsets. I wish to…
0
votes
1 answer

How to compress/archive a temperature curve effectively?

Summary: The industrial thermometer is used to sample temperature at the technology device. For few months, the samples are simply stored in the SQL database. Are there any well-known ways to compress the temperature curve so that much longer…
pepr
  • 20,112
  • 15
  • 76
  • 139
0
votes
1 answer

Obtaining IFFT from frequency domain analytic formula

I'm trying to obtain the time domain signal from an analytic formula in frequency domain, specifically, the formula is: The problem arises when implementing an IFFT, since the following impulse response is obtained: It is clear that the first…
NCC_ML
  • 1
  • 1
0
votes
2 answers

Number of sensors and number of pixels

One question about the sampling process when converting an analog image to digital. I understand about megapixels and stuff, and how the megapixel myth has served the digital camera industry well. And I already understand that a bigger sensor is…
Alfian
  • 147
  • 1
  • 1
  • 9
0
votes
1 answer

sampling with content balancing

I am trying to do sampling with content balancing using the base function. But how do you ensure that at least one row with either group 'a', or 'b' gets selected? a <- cbind(matrix(1:36,ncol=3),rbind(as.matrix(rep('a',each=10)),as.matrix(rep('b',…
Sam
  • 261
  • 2
  • 12
0
votes
1 answer

Sampling a matrix with conditions (no zeros or repeated columns)

In case you are interested in the background of the question, I'm thinking how to solve this post- incidentally, if you solve it there, I'll just erase this question. Ideally, I'd like to get an analytical or algebraic solution (constrained…
Antoni Parellada
  • 4,253
  • 6
  • 49
  • 114
0
votes
1 answer

Duplicate the samples in a dataset?

I use the code to check my dataset 'df' and see serious imbalance in column 'Has_Arrears'. I would expand my target dataset with duplicate samples under Has_Arrears = 1 35 times. i.e. sample 35 times for each observation of Has_Arrears = 1. How can…
LUSAQX
  • 377
  • 2
  • 6
  • 19
0
votes
2 answers

store function results in a vector

I have a function here that takes samples, it works however I'm struggling to store the samples taken in a vector so that I may plot them; here is my function below: InvCDF = function(n, sd) { for (i in 1:n) { u=runif(1, min = 0, max = 1) x =…