How to perform convolution with a dataset?

7 ビュー (過去 30 日間)
Bourbon
Bourbon 2019 年 9 月 22 日
コメント済み: Bjorn Gustavsson 2019 年 9 月 23 日
I have a dataset from an experiment and want to utilize it with the following equation that I have derived analytically
assume A , C, and D as any arbitraty numbers as their derivation is too long to put here along with beta and alpha (not of a concern now as i just want to understand how to implement convolution). while G is the values obtained from experiment as function of time. you do not have to demonstrate this particular one, you may supply your own example but I want to understand how to implement this in matlab with a dataset

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 9 月 22 日
In matlab this should be as simple as
f = A*(C*exp(alpha*t + D*exp(beta*t))); % or whatever you have for that part.
G = psf; % Also given it seems
y = conv(f,G,'full'); % or 'same' or 'valid'
HTH
  2 件のコメント
Bourbon
Bourbon 2019 年 9 月 22 日
編集済み: Bourbon 2019 年 9 月 22 日
Yes G is a given, however, psf function is for point spread fuction of image system. In this case, I have G as a function of t in form of table (t, G). should I integrate G utilizing trapezoidal method prior to implementing convolution instead of psf? the data is quadratic in nature
Bjorn Gustavsson
Bjorn Gustavsson 2019 年 9 月 23 日
conv (and conv2, convn) does discrete convolution and not a analytical/symbolic. If you have your G on a much finer grid than f, then it makes sense to recalculate G to the same discretization - that is: make sure that your dt is the same for G and f. After that everything is the same. (Also: psf is used for 1-D systems like spectrographs too...)
HTH

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

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by