How to normalize curves such that area under curve=1?
54 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Belal Abboushi
am 21 Jan. 2015
Kommentiert: Image Analyst
am 21 Jan. 2015
I'm trying to plot three curves such that area under curve =1. I've tried trapz but it only gives me the area and i couldn't change it.
Any idea?
0 Kommentare
Akzeptierte Antwort
Mohammad Abouali
am 21 Jan. 2015
Bearbeitet: Mohammad Abouali
am 21 Jan. 2015
divide all numbers by the area that you calculate using Trapz.
x=0:0.1:pi;
y=sin(x);
Area=trapz(x,y)
Area =
1.9975
y_normalized=y./Area;
trapz(x, y_normalized)
ans =
1.0000
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!