Integration of a function

2 次查看(过去 30 天)
Amy
Amy 2014-3-11
Hi
I want to solve the integral of (delta/A^2) between 0 and 0.9999999.
delta and A^2 are double workspace variables I have saved as txt files.
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 个评论
Salaheddin Hosseinzadeh
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!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by