フィルターのクリア

how can i increase the number of my data?

6 ビュー (過去 30 日間)
Elias Unk
Elias Unk 2018 年 7 月 21 日
編集済み: Elias Unk 2018 年 7 月 22 日
Basically, i have a 1x200 .mat file, the 200 are the xs (from 0 to 200) and each x has a corresponding y value. The thing is i need my plot and data to be 1x400 from that 1x200, what is the best way to do that as the values must make sense and represent the original graphe with just more data .i just want to increase the # of data without having bad or inaccurate values.

採用された回答

Jan
Jan 2018 年 7 月 21 日
It is not clear what you are asking for. Maybe one of these 2 idea help you:
1. Change the x values:
x = 1:10; % Some test data, use your original signal
y = rand(1, 10);
subplot(1,2,1);
plot(x, y);
subplot(1,2,2);
plot(x * 2, y); % Or what ever change you need in x
2. Interpolation:
xx = linspace(x(1), x(end), 2 * numel(x))
yy = interp1(x, y, xx)
plot(x, y, 'o');
hold on
plot(xx, yy, '+');
  4 件のコメント
Elias Unk
Elias Unk 2018 年 7 月 21 日
Basically adding additional points is all i need as you mentioned above maybe the technical term is linear interpolation and no i haven't if you can recommend the function to do so and test it it'll be great.
Jan
Jan 2018 年 7 月 22 日
As far as I understand, interp1 is the way to go.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by