Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Kramers-Kronig Mathematica code' topicStudent Support Forum > General > "Kramers-Kronig Mathematica code"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
o_0
04/16/13 2:32pm

I tried doing the Table command on the output:
Table[output[omega], {omega, 0, 6}]
and it acts like I'm trying to use a constant as an iterator, but omega is the variable of integration.

NIntegrate::itraw: Raw object 0 cannot be used as an iterator.
(and so on for objects 1 and 2)
General::stop: "Further output of NIntegrate::itraw will be suppressed during this calculation."

{1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[0]/(
0^2 - column1^2), {0, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 0^2 == 0}],
1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[1]/(
1^2 - column1^2), {1, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 1^2 == 0}],
1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[2]/(
2^2 - column1^2), {2, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 2^2 == 0}],
1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[3]/(
3^2 - column1^2), {3, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 3^2 == 0}],
1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[4]/(
4^2 - column1^2), {4, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 4^2 == 0}],
1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[5]/(
5^2 - column1^2), {5, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 5^2 == 0}],
1 + (1/(\[Pi]^2))
150000000 PlanckConstant NIntegrate[column2[6]/(
6^2 - column1^2), {6, column1^2, 0, \[Infinity]},
Method -> "PrincipalValue", Exclusions -> {column1^2 - 6^2 == 0}]}

--------------------
Maybe column1 and column2 are both functions of omega? But this gives a blank graph as well.
output[omega_] :=
1 + (c PlanckConstant)/(2 Pi^2) NIntegrate[
column2[omega]/(omega^2 -
column1[omega]^2), {omega, (column1[omega])^2, 0, \[Infinity]},
Method -> "PrincipalValue",
Exclusions -> {((column1[omega])^2 - omega^2) == 0}]

URL: ,

Subject (listing for 'Kramers-Kronig Mathematica code')
Author Date Posted
Kramers-Kronig Mathematica code o_0 04/15/13 4:52pm
Re: Kramers-Kronig Mathematica code Bill Simpson 04/15/13 9:32pm
Re: Kramers-Kronig Mathematica code o_0 04/16/13 1:18pm
Re: Kramers-Kronig Mathematica code o_0 04/16/13 2:32pm
Re: Re: Kramers-Kronig Mathematica code Bill Simpson 04/16/13 7:07pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic