Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving Kramers- Kronig Relation using MATLAB

  1. Aug 6, 2007 #1

    I have plotted a string of experiment data to form f''([tex]\varpi[/tex])
    However, I do now know how to incoperate the f''([tex]\varpi[/tex]) into KKR. My problem now is that I do not know how to integrate f''([tex]\varpi[/tex]) /{[tex]\varpi'^2-\varpi^2[/tex]} using Matlab.

    I've tried plotting the area under the curve of eq, f''([tex]\varpi[/tex]) /{[tex]\varpi'^2-\varpi^2[/tex]} . But my plotted curve is exactly the same as the curve for f''([tex]\varpi[/tex]) /{[tex]\varpi'^2-\varpi^2[/tex]}
  2. jcsd
  3. Aug 7, 2007 #2
  4. Aug 7, 2007 #3
    I've tried trapz(X,Y). But there is an error saying that "LENGTH(X) must equal the length of the first non-singleton dimension of Y."

    May I know what is the problem?
    How shall i define the length of X since my X is generated with hundreds of experiment data.
  5. Aug 7, 2007 #4
    I'm not sure - can you send me the file containing your data? I'll see what I can do from here...

    ps: once you've loaded the variables X and Y from the data source, just check that the dimensions of these arrays agree using "whos". They should be the same length.
    Last edited: Aug 7, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Solving Kramers- Kronig Relation using MATLAB