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

Microsoft Speech Platform - sampling rate and bit depth

Recognition results are best if sampling rate and bit depth of the audio match the training data of the system. So, does anyone know the exact sampling rate and/or bit depth (and/or stereo/mono) that is used in Microsoft Speech Platform (newest, if…
0
votes
1 answer

Why does mvnrnd(mu,Sigma,M) gives "NaN" as output

I am trying to sample a multivariate Gaussian using mvnrnd, but when I run, the samples are NaN. For example (mu is a 1-by-50 vector, Sigma is a 50-by-50 matrix, and M equals 50): Samp = mvnrnd(mu,Sigma,M) When I run this and check the value of…
elizwet
  • 11
  • 4
0
votes
1 answer

short mysql dates array to readable

I have an array of dates that contains many dates. I have placed all dates on the graph in php, but there is not enough space on the graph. I want to make the dates short (i.e samples) to be placed on the graph. For example …
0
votes
1 answer

Gridding non-uniformly sampled data to a uniformly spaced Cartesian grid via convolution

I am trying to re-grid non-uniform data onto a uniform grid defined in a 4-D space. The data measurement is given by a function d = f(xp,yp,zp,wp), where xp, yp, zp, and wp are the 4-D coordinates. I would like to re-grid the non-uniformaly spaced…
0
votes
1 answer

Matlab reading from serial port at specific sampling rate

I am trying to read values from two sensors (on my arduino) that are being sent to the serial port, with the matlab code below. However, it errors saying ??? Attempted to access sensor1(1); index out of bounds because numel(sensor1)=0 and if the…
user2512053
  • 79
  • 4
  • 12
0
votes
1 answer

Extract a sample from RAW audio file on Android

I have an android application that records AUDIO in raw format how can i extract a sample of the recording? for example if the raw file has 3 minutes of audio recorded, i would like to extract 20 seconds of the contents from an arbitrary start…
Hector
  • 4,016
  • 21
  • 112
  • 211
0
votes
1 answer

Sampling a hemisphere using an arbitary distribtuion

I am writing a ray tracer and I wish to fire rays from a point p into a hemisphere above that point according to some distribution. 1) I have derived a method to uniformly sample within a solid angle (defined by theta) above p Image phi =…
Seb
  • 3,655
  • 3
  • 17
  • 17
0
votes
2 answers

select unique values with equal probability

I have a data frame like the following c1 c2 1 2 1 3 2 4 2 5 2 2 3 1 3 2 ... I want to get unique c1 values, where c2 can be chosen with equal probability if there are multiple rows with the same c1 value. For example, the final result can be: c1…
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
0
votes
1 answer

Plot an eye diagram of a signal in MatLab

The matrix X contained in a .mat file represents the acquired signal. The element of place (i, j) of the matrix is the i-th sample of the j-th screen. The sampling frequency is equal to 4 GS/s. How do I plot the eye diagram relative to the signal…
Fobi
  • 435
  • 1
  • 7
  • 17
0
votes
4 answers

Get N samples given iterator

Given are an iterator it over data points, the number of data points we have n, and the maximum number of samples we want to use to do some calculations (maxSamples). Imagine a function calculateStatistics(Iterator it, int n, int maxSamples). This…
navige
  • 2,447
  • 3
  • 27
  • 53
0
votes
0 answers

Matlab/Simulink To workspace, To file

I have a circuit with voltage source and 4 appliances Simulation time was 0.1s. After the voltage source is one current measurement where i measure the actual level of electricity what i need to calculate the ele. consumption in KW/h . The level…
Zs.Zs.
  • 63
  • 1
  • 1
  • 6
0
votes
1 answer

How to set I/O sampling rate to more than 65535 ms (FFFF)

I'm using an XBee module series 2 with firmware ZNET2.5 ROUTER/END DEVICE API. I would send an ADC sample, but I saw that the IR parameter can be at the maximum 65535 milliseconds; I read about the IR parameter for collecting more samples before to…
Nicola
  • 465
  • 2
  • 7
  • 19
0
votes
4 answers

Converting audio samples into an audible file format

I've been trying to convert a huge amount of data (about 900 MB) to an audible file format for a few days now. I've been given a .dat file containing 900 millions floating-point samples (one per line) representing 90 seconds of music at 10 MHz. I…
mr_hyde
  • 505
  • 1
  • 6
  • 11
0
votes
1 answer

Finding duration of a song

This was a midterm question and I do not know how to calculate this. A CD quality stereo song has been saved on your computer, occupying 35.28 MBytes of storage. The CD quality mandates that we have 16-bit quantization as well as a uniform…
0
votes
1 answer

How to know sampling frequency of a sin(x) function

Consider the following script that plots a sine wave. t = 0:pi/100:2*pi; y = sin(t); plot(t,y) grid on % Turn on grid lines for this plot This gives me a plot of sine wave. I understand the sine wave that appears continuous, should actually be…
gpuguy
  • 4,607
  • 17
  • 67
  • 125
1 2 3
99
100