Borrar filtros
Borrar filtros

グラフデータ補完方法​について教えて頂けま​すでしょうか

10 visualizaciones (últimos 30 días)
M M
M M el 27 de Sept. de 2022
Comentada: M M el 12 de Oct. de 2022
サンプリングが一定でないグラフ(1)にデータを補完して、サンプリング一定のグラフ(2)を作る方法はありませんでしょうか。
グラフ(1)のデータは関数に従ってプロットされている訳ではなく(例としては飛んでいる物体をカメラ計測し、座標値をプロットするイメージです)、サンプリングも一定ではありません。
このグラフをデータ補完し、サンプリングが細かく・一定のグラフにしたいです。
※添付した資料を見て頂けると幸いです。
関数が与えられておらず、グラフ(1)のサンプリングが一定ではない為、方法が分からず悩んでおります。
宜しくお願い致します。

Respuesta aceptada

Hernia Baby
Hernia Baby el 27 de Sept. de 2022
interp1関数もしくはresampleで可能です。
rng default
nominalFs = 48000;
f = 500;
Tx = 0:1/nominalFs:0.01;
irregTx = sort(Tx + 1e-4*rand(size(Tx)));
x = sin(2*pi*f*irregTx);
figure
plot(irregTx,x,'.')
44.1 kHz の等間隔のレートに変換します
desiredFs = 44100;
[y, Ty] = resample(x,irregTx,desiredFs);
plot(irregTx,x,'.-',Ty,y,'o-')
legend('Original','Resampled')
ylim([-1.2 1.2])
  7 comentarios
Hernia Baby
Hernia Baby el 11 de Oct. de 2022
こちらについては別途質問する事をお勧めします。Simulink系に詳しい人がいるため、より良い方法を提示してもらえる可能性が高いからです。自分の場合だとMATLAB Fcnブロックを使って出来るか試します。この場合、リアルタイム性がどれだけ失われるかは考慮してません。
M M
M M el 12 de Oct. de 2022
承知しました。他の方にも聞いてみます。
今までの質問に回答して頂きありがとうございます。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre プログラムによるモデル編集 en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!