flux line

3 Ansichten (letzte 30 Tage)
Hager
Hager am 20 Mär. 2011
hi , I have this program for calculate the V(x,y) and I want to sketch of flux lines and equipotential lines using matlab. By given : For b = a=0.25m , (V0)=50 V we have V(x,y)=(-4(V0)/pi) sum(sin((n*pi*x)/b)*sinh((n*pi*(a-y))/b))/(n*sinh(n*pi*a)/b))
"% SOLUTION OF LAPLACE'S EQUATION
%======================
% THIS PROGRAM SOLVES THE TWO-DIMENSIONAL
% BOUNDARY-VALUE PROBLEM
% a AND b ARE THE DIMENSIONS OF THE TROUGH
% x AND y ARE THE COORDINATES OF THE POINT % OF INTEREST
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=l:10
n = 2*k - 1
al = sin(n*pi*x/b);
a2 = sinh(n*pi*(a-y)/b);
a3 = n*sinh(n*pi*a/b);
sum =sum + c*al*a2/a3;
P = [n, sum]
end
diary test.out
P
diary off "
Can you help me????

Antworten (0)

Kategorien

Mehr zu Sparse Matrices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by