Definite sum and integral in the same expression with other parameters

2 views (last 30 days)
I want to do a definite sum of 'o' from 1 to q and a double integral from 0 to 1. 'o' is a vector of length=q that i get from a function (muvec1), so i tought to use a for cycle. I have several problems 1. The for cycle doesn't work. If i print 'o' values it returns proper results but it doesn't work inside the for. 2. I'm not able to make quad2d work with parameter different from variable of integration I could probably do the integration first and then the sum but other issues come across
alfa=2;
q=7;
Biot=3;
for i=1:q
o = muvec1(q,Biot);
S=@(x,y)(((cosh(alfa.*(o).*(x-1))./(cosh(alfa.*o)))).*(cos(o.*w.*y)));
M= symsum(S,o,0,q);
G =@(X,Y) M.*(cos(o.*y)).*cos(p.*x).*sin(o.*y);
C = quad2d(G,0,1,0,1);
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!