Integration of a function
2 views (last 30 days)
Show older comments
Hi
I want to solve the integral of (delta/A^2) between 0 and 0.9999999.
My Script so far for this is
load ASqr.txt
load delta.txt
realZeros = (1/pi).*(int('delta./ASqr',0,0.9999999))
format long e
realZeros
When I run the script in the command window the following error is being thrown up
Undefined function 'int' for input arguments of type 'double'
Which I am unsure about, would anyone be able to guide me on where I am going wrong, as solving integrals in matlab is new to me. Thank you in advanced.
1 Comment
Salaheddin Hosseinzadeh
on 11 Mar 2014
I'm not sure wha't is the function you want to take the inetgral from. I guess it's Dirac or as you said delta, if you want to perform a symbolic inegral you have to define a symbol first
syms x
y=int(dirac(x))
subs(y,.999)-subs(y,0)
Which gives you 1 anyway! Hope that wouls solve the problem! Good luck!
Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!