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
0 answers

Arbitrary waveform generator (How does the input of AWG affects the output)

How should one choose the sampled input for AWG so that it gives a waveform similar to the ideal waveform? I have a data set for voltage signal sampled over time of 1 ns, which I am entering as an input for the AWG function which resamples the data…
0
votes
1 answer

Saving output in the form of an array

I want to save the output out in the form of a column vector which is currently coming out as ans(:,:,1) = 0 ans(:,:,2) = 0 ans(:,:,3) = 0 ans(:,:,4) = 0 ans(:,:,5) = 0 ans(:,:,6) = 0 ans(:,:,7) = -5.5511e-017 function [out]= myfun1(in) in=…
0
votes
4 answers

Randomly Assign Integers in R within groups without replacement

I am running an experiment with two experiments: experiment_1 and experiment_2. Each experiment has 5 different treatments (i.e. 1, 2, 3, 4, 5). We are trying to randomly assign the treatments within groups. We would like to do this via sampling…
Thomas
  • 195
  • 4
  • 11
0
votes
0 answers

Speeding up plotting of a network graph through sampling

I am trying to plot a network graph that has 3,296 edges and 2,893,873 ties. This is taking a long time. Is there any feasible way of speeding up the plotting of the graph through just sampling parts of it? Is there a way to randomly sample from a…
histelheim
  • 4,938
  • 6
  • 33
  • 63
0
votes
0 answers

Split stereo track into mono track functionality

I am using audacity to play back the raw stereo 16-bit linear PCM (dumped in Android HAL) which is the output of Android audio flinger. Total buffer is 960 bytes. What is the right way of converting stereo to individual mono channels (left and…
newbie_old
  • 500
  • 5
  • 19
0
votes
1 answer

Windows Vista Speech Recognition engine sampling rates

I need to recognize the speech from a set of WAV files that are not recorded on the computer doing the recognition. I know that if you recognize the speech from WAV files that are recorded at the same sampling rate as the recordings that the engine…
Diana
  • 35
  • 4
0
votes
1 answer

What is the simplest way to play a sample/tone with given tempo in SuperCollider

I'm curious what is the easiest way to play a sound file or some frequency with given tempo. The easiest metronome you can implement. Any ideas?
ciembor
  • 7,189
  • 13
  • 59
  • 100
0
votes
1 answer

Reading a file that corresponds to time step in solving ODE

I'm trying to solve an ODE in Matlab and I have the following problem: my code is as bellow: xinit=[0.19;25;0;7]; t=0:768:76800; %% 101 cells [t1,y]=ode45(@Model_Bio,t,xinit); In the function @Model_Bio I have a parameter that I need to read its…
Mehrian
  • 11
  • 3
0
votes
2 answers

How to design a randomized algorithm to run in a fixed time?

Does anybody know how to best implement a randomized algorithm (Monte Carlo simulation to approximate a value) to run in a fixed time (5 minutes)? i.e. the algorithm will continue to take new samples until the execute time is around 5 minutes? This…
philipvn
  • 5
  • 5
0
votes
0 answers

How to sample a SARIMA model with given parameters in R

I have a time series in R called jj. > jj Jan Feb Mar Apr May Jun Jul 1 2.5625072 2.6864995 2.7760495 2.6864995 2.6176149 2.8472302 2.8889086 2 2.4733998 2.5853644 2.3614352 2.5548286 2.2392920…
0
votes
0 answers

Choosing a sample rate for GBM models

I've created several GBM models to tune the parameters (trees, shrinkage and depth) to my data and the model performs well on the out-of-time sample. The data is credit card transactions (running into 100s of millions) so I sampled 1% of the good…
Karan
  • 31
  • 1
  • 3
0
votes
1 answer

Matlab Distribution Sampling

How can I create a vector x in Matlab that has values between 0.8 and 1.2, randomly sampled from a: 1. Uniform 2. Normal distribution? There are a lot of functions dealing with distributions, but I'm having trouble using them properly.
Vidak
  • 1,083
  • 14
  • 29
0
votes
1 answer

How to achieve Sampling in Java?

I am trying to convert a 8-bit image to 4-bit image using sampling ,but not sure how to do it . Any code samples would be really helpful. Thanks in advance.
user3962770
0
votes
1 answer

Binomial Sample Size with r

I would like to know if there is any package and how to use it about sample size calculation for binomial distribution. I have to sample fruits in three fields and I have to count the number of defects. I would like to know how many fruits i have to…
Spigonico
  • 137
  • 1
  • 10
0
votes
1 answer

Loop audio at/to specific samples/times

Is there a way, using Java, that I can have an audio file(of any format, whichever can work for this), that is played, starting from the beginning, up until x samples have been played, then continues playing until y samples have been played, then…
user2649681
  • 750
  • 1
  • 6
  • 23