필터 지우기
필터 지우기

Integration of a function

조회 수: 2 (최근 30일)
Amy
Amy 2014년 3월 11일
댓글: Salaheddin Hosseinzadeh 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
Salaheddin Hosseinzadeh 2014년 3월 11일
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