Borrar filtros
Borrar filtros

Gauss quadrature Integral - exponential function (help please)

2 visualizaciones (últimos 30 días)
noxnoxmox
noxnoxmox el 22 de Mzo. de 2013
I have been trying for awhile to figure out if my function is correct or not.
The function is G = 100 e^(-2t/T) * sin^2 (2*pi*t/T) as written in the question
I typed the script of Gauss quadrature as two scripts one as sub-function and the other as the main
Sub-function (script):
function [y] = myfun(t) y = 100*exp(-2*t/T)*(sin(2*pi*t/T).^2));
Main (script): Q = quad(@myfun,a,b)
where my inputs are a = 0; b = T/2; % where T is 1
The results appear though I am not quite sure. I did it by hand and I got 3.926
Anyway, please check if it is correct.
Thanks

Respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by