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