How to normalize a plot ?

6 次查看(过去 30 天)
Snapshot83
Snapshot83 2016-3-10
评论: Snapshot83 2016-3-10
Hi, can anybody help me to understand how to normalize a spectrum ? I have a spectra and I want to obtain its area equal to 1. Thanks in advance.

采纳的回答

Jan
Jan 2016-3-10
If you want the area to be 1.0, create the sum over the spectrum and divide the values by the result.
spectrum = rand(1, 100); % Example data
normalized = spectrum / sum(spectrum);
  1 个评论
Snapshot83
Snapshot83 2016-3-10
Thank you for your reply. What does it mean sum ? How I should proceed if I have value in x and y coloumns ?

请先登录,再进行评论。

更多回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by