Hi, I would like to do this integration where the j of cj is the loop variable.
I tried this but when I calculate Phi_ij1(1,1) for example, Matlab says "unrecognized function or variable 'y' ". Can you help me?
for j=1:13 x_max1 = @(y,j) (-sqrt(3)/3).*y + c(j); y_min1 = @(j) (sqrt(3)/2)*c(j); y_max1 = @(j) c(j)*sqrt(3); Phi_ij1 = @(i,j) integral2(B_zi(i,x,y), 0, x_max1(y,j),0,y_max1(j)) - integral2(B_zi(i,x,y),0, x_max1(y,j),y_min1(j),y_max1(j)) ;end
Best Answer