Hi,
I understand that you are trying to implement a 1D gaussian filter multiplied by an exponential function.
Please follow the below workflow to implement the custom 1D filter:
- Create a function handle for the polynomial part, f(t) using the @(t) notation.
- Create the Gaussian filter using the “normpdf” function and determine the mean (mu) and variance (sigma^2) values that best fit your data as these values control the shape and position of the Gaussian filter.
- Multiply the polynomial function f(t) with the Gaussian filter
Please refer to the below code snippet that illustrates the implementation of custom 1D gaussian filter:
f = @(t) t.^2 .* exp(-t.^2); % Define the function f(t) = t^2 * exp(-t^2)
mu = 0; % Mean of the Gaussian filter
sigma = 1; % Variance of the Gaussian filter
gaussianFilter = @(t) normpdf(t, mu, sigma); % Define the Gaussian filter
filteredFunction = @(t) f(t) .* gaussianFilter(t); % Combine the polynomial and Gaussian filter
Please refer to the below documentation to learn more about the “normpdf” function:
Hope it helps.
Regards,
Sai Pavan