how to calculate integration with limited condition at upper limit and lower limit

1 view (last 30 days)
I want to solve a maxium of integration ' max( quad(x-v,Ei,Eg) ) ' where Eg=0.5:.05:1.3 , 0<Ei<Eg , 0<v<Ei , here is my code :
Eg=0.5:0.05:1.3 ;
Ei=arrayfun(@(x)0:.05:x-.05,Eg,'un',0) ;
y = zeros(numel(Eg),1);
for j1 = 1:numel(Eg);
a = arrayfun(@(ei)quad( @(x)x,ei,Eg(j1)),Ei{j1}) ;
y(j1) = max(b);
end
I try to add an ' v ' but I dont know what can I do . thx :)

Answers (0)

Categories

Find more on Programming 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!