Selecting random points from data file
Ältere Kommentare anzeigen
Hi, is there any algorethim to select random points from a large data file. Lets say I want to select data after every 20 values. x = [1:0.1:1000]
If I want y = select every 10th 20th or 50th point of x
Thanks Amb
4 Kommentare
per isakson
am 12 Dez. 2014
Bearbeitet: per isakson
am 12 Dez. 2014
Try
>> M = 1:100;
M(20:20:100)
ans =
20 40 60 80 100
but that's hardly random.
Azzi Abdelmalek
am 12 Dez. 2014
The question is not clear, "10th 20th or 50th point of x"
amberly hadden
am 12 Dez. 2014
amberly hadden
am 12 Dez. 2014
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 12 Dez. 2014
x = [1:0.1:1000];
n=randi(5)*10
out=x(n:n:end)
1 Kommentar
amberly hadden
am 12 Dez. 2014
Kategorien
Mehr zu Interpolation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!