How to solve an equation with a variable that has multiple values

Hello, I can't solve the attached equation for two specific variables using two loops on matlab.
with: loop1 for x1 and x3 = 0 to 1000 and loop2 for m and n = 0 to 10,
a = b =1000; and Teta(mn) = 0.1
Either way, any help would be greatly appreciated!

4 commentaires

What have you tried yet? Show your attempt and ask a specific question where you are having trouble.
For a fixed value for theta_mn (in your case 0.1), the infinite series won't converge.
Hello Dyuman,
Thanks for this answer, i try this script as follow, but I want the oscillation in the interval [400 600] to be around 0.1 only (like the gibbs phenomen)
clear all, close all
r=1e-0;
a=1000*r; b=a; pasx=r; pasy=pasx;
x0=500*r;
z0=500*r;
c=100*r;
d=100*r;
x1_int=x0-c; x1_fin=x0+c;
x3_int=z0-d; x3_fin=z0+d;
x111=0:pasx:a;
x333=0:pasy:b;
tethh=zeros(length(x111),length(x111));
i=0;
for x1=0:pasx:1000
i=i+1;
tethy=[];
j=0;
for x3=0:pasy:1000
j=j+1;
if x1>=400 & x1<=600 & x3>=400 & x3<=600
teth=0;
for m=0:10
for n=0:10
c=cos(((m*pi)/a)*x1);
s=sin(((n*pi)/b)*x3);
teth=sum(sum(abs(Omn*c*s)));
end
end
tethh(i,j)=teth;
clear teth
else
tethh(i,j)=0;
end
end
figure(1)
meshc(x333,x111,tethh)
axis tight
shading interp
grid on,xlabel('x_1 (nm)'),ylabel('x_3 (nm)'),zlabel('\theta (K)'),colormap('jet'),colorbar
figure(2)
plot(x111,tethh(401,:))
Hello Torsten,
Utmost thank you for response, I want to run the oscillation in the interval [400 600] to be around 0.1 only (like the gibbs phenomen).

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by