How to take the convolution of two functions
12 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to find the convolution of a x=rectangular pulse function and an f=inverse laplace transform function(found by doing ilaplace) however when I type the code y=conv(x,f) it throws these errors:
Error using conv2
Invalid data type. First and second arguments must be numeric or logical.
Error in conv (line #)
c = conv2(a(:),b(:),shape);
I've looked up many examples to try to fix this but so far none have worked.Any advice would be appreciated.
2 件のコメント
回答 (1 件)
Walter Roberson
2017 年 11 月 24 日
For convolutions of functions, you have a few options:
- Do not take the convolution of functions, take the convolution of vectors of values. This can be done in multiple ways, including by using filter() and methods involving fft(). This is discrete convolution and does not give you a formula for the result
- If you need formulas for the result, then use the symbolic toolbox to calculate the convolution integral
- If you need formulas for the result, in the special case of functions are 0 for negative values, then you can take the inverse laplace transform of the product of the laplace transforms of the two functions. http://mathfaculty.fullerton.edu/mathews/c2003/laplaceconvolutionmod.html
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Computational Geometry についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!