- #1
alba_ei
- 39
- 1
Homework Statement
The Attempt at a Solution
%2.11
x=1:0.5:5; a=sqrt(2.8);
n=[1:1:100];
Sn=prod(1-(x.^2)./(n.^2-a^2));
S_inf=(a/sqrt(a^2+x.^2)).*sin(pi*sqrt(a^2+x.^2))/sin(pi*a);
e_n=100*(Sn-S_inf)./S_inf
I know I can't use ./ if the two matrices are different, meaning x./n.
How do I use the prod function without going through this issue?