Calculate area under FFT graph in MATLAB

前端 未结 2 1300
终归单人心
终归单人心 2021-01-05 22:22

Currently I did a FFT of a set of data which gives me a plot with frequency at x axis and amplitude at y axis. I would like to calculate the area under the graph to give me

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 23:01

    The FFT is discrete, not continuous - you just need to sum all the bin values. If you're looking at the power spectrum (magnitude squared) then the bin values are in W/Hz, so you would need to multiply each value (or alternatively just the sum), by the bin width in Hz to get power (and hence the total energy in your input sample).

提交回复
热议问题