matlab code: P = [ ]; Vo = 100.0; a = 1.0; b = a; x = b/4; y = 3.*a/4.; c = 4.*V
ID: 2249660 • Letter: M
Question
matlab code:
P = [ ];
Vo = 100.0;
a = 1.0;
b = a;
x = b/4;
y = 3.*a/4.;
c = 4.*Vo/pi;
sum = 0.0;
for k = 1:10
n = 2*k - 1
a1 = sin(n*pi*x/b);
a2 = sinh(n*pi*y/b);
a3 = n*sinh(n*pi*a/b);
sum = sum + c*a1*a2/a3;
P = [n, sum]
end
What is the modified code?
Read and understand the 2-D solution of the Laplace's equation in Examples 6.5 and 6.6 in your text book. Then modify the MATLAB code provided at the end of the example, and use it to draw the equi-potential lines as well as the flux lines on two different plots and then combine them on one single plot, for each case. Consider the following cases: 1) A constant voltage V 25. 2) Avariable voltager,.10s(y.alsxsb 3) AVariable voltage l_5sin+2.5sin(ysa,OSxsb 2) Avariab |- ,y=a,0 b xExplanation / Answer
Vo = 25;
a = 10;
b = 2.5;
x = b/4;
y = 3.*a/4.;
c = 4.*Vo/pi;
sum = 0.0;
for k = 1:10
n = 2*k - 1
a1 = 10sin(4*pi*x/b);
a2 = 5si(pi*x/b);
a3 = 2.5*sin(3*pi*x/b);
v0 = a1+a2;
P = [n, sum]
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.