How to write integral equation ?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael Crown
am 5 Sep. 2020
Beantwortet: Michael Crown
am 10 Sep. 2020
I like to check if my code represent the equation. Please help
10 Kommentare
Akzeptierte Antwort
David Hill
am 5 Sep. 2020
Not sure if your Ca is sorted. Yes, you have a stream of data that is being integrated. The proper function is trapz(). Providing your full code helped significantly. I assume you want your data sorted before integrating.
[Ca,idx]=sort(dataB(:,1));
Da=dataB(:,2);
Da=Da(idx);%aligns Da to sorted Ca
DaveA=trapz(Ca,Da)/(Ca(end)-Ca(1));
8 Kommentare
Weitere Antworten (3)
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!