How can I find the area above the parabolic curve for this particular case?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Usman Mahmood
am 25 Mai 2018
Beantwortet: sloppydisk
am 25 Mai 2018
Hi, I am new to MATLAB (so pardon me for a rather elementary question). I need to find the area above the curve (z=0.0012*v^1.5) by integration as shown in the figure.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190829/image.jpeg)
I tried using this:
Area = sum(v(v>0))
I am not sure if this is giving me the area correctly. What else can I try using Matlab?
0 Kommentare
Akzeptierte Antwort
sloppydisk
am 25 Mai 2018
An elegant way to do this is via function handles:
x = linspace(0, 11, 100);
y = @(x) .0012*x.^1.5;
yforArea = @(q) max(y(x)) - y(q);
area = integral(yforArea, 0, max(x))
Or just via trapezoidal integration directly:
x = linspace(0, 11, 100);
y = .0012*x.^1.5;
z = trapz(x, max(y)-y)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!