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

Correlate 3 vectors that are sampled from 3 different distributions

I have three vectors with sampled values, each from a specific probability distribution. (The vectors contain time series data of the growth rate of retail prices of specific…
AJM
  • 17
  • 4
0
votes
1 answer

R programming: getting most likely value by sampling

I have a table which has an elasticity column. To each of the records, I want to assign a new elasticity value. That value is based on performing a sampling assuming uniform distribution. For eg, lets say I have 4 records with elasticity values…
Cyang
  • 379
  • 1
  • 8
  • 18
0
votes
1 answer

uniformly distribution of phases

suppose that we have following model,where phases are uniformly distributed in range of [-pi pi] clear all; A1=24; A2=23; A3=23; A4=23; A5=10; f1=12; f2=14; f3= 20; f4=7; t=0:0.01:2.94; phi=2*pi*(rand(1,4)-0.5); x=rand(length(t)); …
user466534
0
votes
2 answers

increase the number of defaulters in a sample

I have a banking dataset which has 5% defaulters and the rest are good( non-defaulters). I want to create a sample which has 30% defaulters , 70% non-defaulters. Assuming my dataset is data and it has a column named "default" signifying 0 or 1, how…
justintime
  • 83
  • 1
  • 8
0
votes
2 answers

Sample exactly four maintaining almost equal sample distances

I am trying to generate appointment times for yearly scheduled visits. The available days=1:365 and the first appointment should be randomly chosen first=sample(days,1,replace=F) Now given the first appointment I want to generate 3 more appointment…
ECII
  • 10,297
  • 18
  • 80
  • 121
0
votes
1 answer

Xilinx warnings (FF/Latch trimming) in Verilog for a MSB downsampling

In this other question I asked I got some general advice regarding my module. Now I seek advice here since I noted that the Verilog community has more users. I am trying to implement into an existing framework a Most Significant Bit (MSB)…
titus.andronicus
  • 517
  • 1
  • 7
  • 19
0
votes
1 answer

Read the bitmap from Parse on Android

ALL, I have a following problem. Here is the code: class ParseCommunicator { private static int width = -1; private static int height = -1; @SuppressWarnings("deprecation") public void getPhoto(Device dev) throws ParseException,…
Igor
  • 5,620
  • 11
  • 51
  • 103
0
votes
1 answer

Sampling from a discrete set where each element has a corresponding density

Here is my problem in Matlab: I have a set of integers e.g. A={10,11,12,...,T} with corresponding densities P={p(10),p(11),P(12),...,P(T)}. How do I randomly sample from A using the weights from P?
Seb
  • 165
  • 9
0
votes
1 answer

Matlab:Interpolation Error

I would like to perform a frame based analysis on the following curve Which expresses the relation between time and concentration (x-axis: time in minutes; y-axis: concentration in Mbq): For the above curve I would like to perform frame based…
DevanDev
  • 245
  • 2
  • 11
0
votes
1 answer

stratified sampling with group size below sample size in R

I have response data by market in the format: head(df) ID market q1 q2 470 France 1 3 625 Germany 0 2 155 Italy 1 6 648 Spain 0 5 862 France 1 7 699 Germany 0 8 460 Italy 1 6 333 Spain …
0
votes
1 answer

Extracting audio data every t seconds

I am trying to extract amplitude information from a sound loaded from a URL using the Web Audio API instantaneously (not in real time), which will likely require the OfflineAudioContext. I am expecting to obtain something along the lines of an array…
0
votes
1 answer

Latin Hypercube Sampling from a Normal Distribution (Matlab)

I want to use the Latin Hypercube sampling method to select points uniformly from a Normal Distribution. If I have the line below which gives me a Normally Distributed set of data, how would I then go about applying the Latin Hypercube method to…
user131983
  • 3,787
  • 4
  • 27
  • 42
0
votes
1 answer

How to get a regular sampled matrix in Scilab

I'm trying to program a function (or even better it it already exists) in scilab that calculates a regular timed samples of values. IE: I have a vector 'values' which contains the value of a signal at different times. This times are in the vector…
MAB
  • 117
  • 2
  • 13
0
votes
1 answer

Sampling time and frame overlap in melcepst() in voicebox, matlab?

I have a matrix of 21000x13 of mfccs from a wav file. I have a label file which has the start time end time and label of that time period in a text file. I need to find the time for each frame in the mfcc matrix so labels can be used for each frame.…
chris
  • 190
  • 1
  • 14
0
votes
1 answer

conditional subsetting of two columns - r

I have a couple problems that I'm interested in solving. I would like to sample and store the conc column in the array by a value e.g.: newdata <- data[ which(data$conc > 8), ] However, I would like to save the associated datetime stamp with it.…
squishy
  • 489
  • 1
  • 6
  • 19