Defining a constant 'a' as a limit of integration
Show older comments
hello can can anybody help me with this y(h-y)dy integrate with respect to y with lower limit of 0 and upper limit of a*sqrt(3)
a is a constant h is a variable how do I get Matlab to accept a as a constant or simply get Matlab to understand that the upper limit is simply a scalar multipe of sqrt(3)
Thank you I really appreciate any help
Answers (1)
Andrei Bobrov
on 3 Jan 2012
syms y h a
out = int(y.*(h-y),y,0,a*sqrt(3))
e.g.
subs(out,[a h],[1 1])
OR
h = 1;a = 1;
out = quad(@(y)y.*(h-y),0,a*sqrt(3))
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!