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

R creating multiple samples with non integer sample size

I’m using R and I have a vector, lets just say vec <- c(1:10). I need to sample from this vector about 1000 times, however the sample size that I need to use is a noninteger, for example 3.66666. Obviously when I input this in, it rounds down to 3.…
ricks.k
  • 101
  • 3
0
votes
1 answer

Sampling triangle mesh obtained with Delaunay function

I have a colection of 3d cloud points such as the one that follows, representing a 3d shape: My goal is to increase the number of points on each cloud so that I obtain more 'continuous' clouds. Also it would be important to be able to set the…
Filipe Aleixo
  • 3,924
  • 3
  • 41
  • 74
0
votes
1 answer

Estimating change of a cyclic boolean variable

We have a boolean variable X which is either true or false and alternates at each time step with a probability p. I.e. if p is 0.2, X would alternate once every 5 time steps on average. We also have a time line and observations of the value of this…
0
votes
3 answers

Splitting an audio file in Matlab

I'm trying to split an audio file into 30 millisecond disjoint intervals using Matlab. I have the following code at the moment: clear all close all % load the audio file and get its sampling rate [y, fs] = audioread('JFK_ES156.wav'); for m = 1 :…
Essam
  • 157
  • 1
  • 2
  • 12
0
votes
0 answers

scala.util.Random generates nearly identical doubles with different seeds

I came across something in scala.util.Random that led me to unnecessary debugging yesterday. I just needed random Doubles, and so used scala.util.Random. For similar seeds (i.e., integers 0 ... N ), I found that the first call to nextDouble()…
modulus0
  • 3,798
  • 1
  • 12
  • 10
0
votes
0 answers

error vector must be the the same length WHEN using resample?

In audio recorder MATLAB 2014 edition function I have problem related to the size ? I can't use waverecorder in the 2014 edition. I tried look for the answer but I didn't find. Please tell me what changes should be made so they can be of same size…
0
votes
1 answer

Continuous resampling in parallel in Labview

I need to resample an arbitrary number of complex signals, perform some miscellaneous operations on them, and finally sum them and save them to a file. The length of the signals forces me to buffer the signals into chunks and operate on them as…
meex
  • 87
  • 4
0
votes
1 answer

Data Aquisition and plotting simultaneously on Matlab

I have a loop of reading Voltages from Arduino (with a specific sampling rate and clock Frequency). When I read data without plotting (loop include only the fread/fscanf and i++), the data appears without any problems. Once I add rolling plot to…
0
votes
2 answers

R function to map list to list-of-lists

I've seen this answer to take a list of numbers and apply a function to each element to make a modified list: https://stackoverflow.com/a/26164349/115237 Given a list like this: # x <- sample(seq(1, 91, 10)) x <- c(1, 61, 81, 51, 41, 71, 31, 21, 11,…
Noel Evans
  • 8,113
  • 8
  • 48
  • 58
0
votes
2 answers

Stratified sampling

I am still quite new in R and I have a probably quite easy question, I hope you will be able to answer. I work the dataset: GSS 2010. I have an id for each respondent, I have the variable 'region' with 9 numeric levels. In all 2044 observations of…
0
votes
0 answers

Intel VTune Sampling after certain period of time

I am new to VTune and was playing around with it. One thing that I was not able to figure out was how do I get multiple samples of the events after every 20 seconds and save them in a text file. For example, run an application using VTune and get…
user782400
  • 1,617
  • 7
  • 30
  • 51
0
votes
1 answer

Randomly generate a subset data based on probabilities

This is about the resampling questions. I want to generate a species list fro a random sample of n individuals based on the species probabilities. For example: there are 3 species c("sp.1", "sp.2", "sp.3"),and their abundance is c(1,2,3). I want to…
cong
  • 23
  • 2
0
votes
0 answers

Sampling user trajectory data

I am having a dataset with the set of locations visited by users all over the world. The dataset looks like the following: 1 55 66 22 88 2 11 33 ........ ........ 99 88 22 66 99 55 33 100 33 44 88 First column is the userid and the folowing columns…
Pramit
  • 23
  • 7
0
votes
1 answer

How to set sampling rate when reading force sensor data using NI DAQ card

I am reading force sensor data using NI DAQ card, I am able to read the data perfectly but I am confuse how to set the desired sampling rate.Right now when I am checking the sampling rate it is giving me random value like some time it is 500hz and…
nabeel
  • 159
  • 2
  • 3
  • 13
0
votes
0 answers

How do I use Metropolis Sampling in MATLAB to calculate an integral?

I am trying to write a matlab function to solve a test integral using the Metropolis Method. My function is listed below. The integral is from 0 to infinity of x*e(-x^2), divided by the integral from 0 to infinity of e(-x^2) This function converges…
John
  • 1
  • 1