フィルターのクリア

i have 729 data points within a particular range of lat &long. how can i reduce this to 150 without changing the range of lat&long..?

2 ビュー (過去 30 日間)
i want to make this data equal size with another so that i have to reduce the size. but donot change the range. eg:10,9,8,7,6,5,4,3,2,1,0 11 elements , should reduce to 10,7,4,1,0 with out changing the upper &lower limits

採用された回答

lvn
lvn 2014 年 3 月 3 日
編集済み: lvn 2014 年 3 月 3 日
This should do it:
lat=rand(729,1);
step=729/149;
latshort=[lat(1:step:end-1); lat(end)]

その他の回答 (1 件)

Giorgos Papakonstantinou
Giorgos Papakonstantinou 2014 年 3 月 3 日
I assume that you don't care about the values in between maximum and minimum
A=randi(1000, 729,1); % create an random matrix 729x1
[~,order]=sort(A); % sort ascending the matrix A
idx = round(linspace(1,729,150)); % create a 150 row indice for 729 elements
A(~ismember(order, idx))=[]; % delete the elements which do are not in the 150 row indices

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by