Matlab Coding

© All Rights Reserved

12 views

Matlab Coding

© All Rights Reserved

- Abaqus Theory Manual
- ElE431Exam1Fall09
- Basic Matlab
- Statics Ch1 Presentation
- Www Sanfoundry Com
- Calc3_Chapter1
- Matlab_Formulas_List
- Basic Matlab Material
- Mathematics Paper With Answer Solution Paper 1
- Lab Report of Chap#3
- Dsp Matlab & Two Marks
- Vectors
- Draft Assignment 2
- Iowa Core Curriculum Standards
- 2-D Line Plot - MATLAB Plot
- Lecture 02
- 1MCOMP0203.PDF
- Dynamics of Urban Bike Sharing Systems.pdf
- A Comparison of Age Level on Baseball Hitting Kinematics
- Introduction to Matlab.ppt

You are on page 1of 2

Js=J*[0 0 1]; %the vector of surface current

Zmax=10; %coordinate of maximum z value on line

dL=dz; %area of one subsection of line

XCellCenter=0;%just as origin

YCellCenter=0;

axis,set by yourself.

NumberOfYPlottingPoints=30; %number of plotting points along the y axis

PlotXmin=-5; %lowest x value on the plot plane

PlotXmax=5; %maximum x value on the plot plane

PlotYmin=-5; %lowest z value on the plot plane

PlotYmax=5; %maximum z value on the plot plane

PlotStepX= (PlotXmax-PlotXmin)/(NumberOfXPlottingPoints-1);%plotting

step in the x direction

PlotStepY=(PlotYmax-PlotYmin)/(NumberOfYPlottingPoints-1); %plotting

step in the y direction

[XData,YData]=meshgrid(PlotXmin:PlotStepX:PlotXmax,

PlotYmin:PlotStepY:PlotYmax); %build arrays(matrix) of plot plane

PlotZ=0; %since xy plane so z equal zero

Bx=zeros(NumberOfXPlottingPoints,NumberOfYPlottingPoints); %x component

of field

By=zeros(NumberOfXPlottingPoints, NumberOfYPlottingPoints);%z component

of field

for m=1:NumberOfXPlottingPoints %repeat for all plot points in the x

direction

for n=1:NumberOfYPlottingPoints %repeat for all plot points in the y

direction

PlotX=XData(m,n); %x coordinate of current plot point

PlotY=YData(m,n); %y coordinate of current plot point

if ((PlotY==0)&(PlotX>=Xmin)&(PlotX<=Xmax)) % if the plotting point is

on the current sheet

Bx(m,n)=J/(4*pi); % we use the model of infinite current sheet

By(m,n)=0;

continue;

end

Rp=[PlotX PlotY PlotZ]; %poistion vector of observation points, for the

position of answer

100 to 1, then will stop.

Rc=[XCellCenter YCellCenter ZCellCenter]; %position vector of center of

current subsection, define line current

R=Rp-Rc; %vector pointing from current subsection to the current

observation point

norm_R=norm(R); %get the distance between the current surface element

and the observation point

R_Hat=R/norm_R; %unit vector in the direction of R

dH=(dL/(4*pi*norm_R*norm_R))*cross(Js,R_Hat); %this is the contribution

from current element

Bx(m,n)=Bx(m,n)+dH(1,1); %increment the x component at the current

observation point

By(m,n)=By(m,n)+dH(1,2); %increment the z component at the current

observation point

end %end of j loop

end %end of n loop

end %end of m loop

xlabel('x(m)');%label x axis

ylabel('y(m)');%label y axis

P=[0 2 0];%position of point P

Hp=[0 0 0];%the magnetic field at point P

Rc=[XCellCenter YCellCenter ZCellCenter]; %position vector of center of

current subsection

R=P-Rc; %vector pointing from current subsection to the current

observation point

norm_R=norm(R); %get the distance between the current surface element

and the observation point

R_Hat=R/norm_R; %unit vector in the direction of R

dH=(dL/(4*pi*norm_R*norm_R))*cross(Js,R_Hat); %this is the contribution

from current element

Hp=Hp+dH;

end %end of j loop

- Abaqus Theory ManualUploaded byAbdul Munir
- ElE431Exam1Fall09Uploaded byOreva Addoh
- Basic MatlabUploaded byMuzamil Ahamed
- Statics Ch1 PresentationUploaded byWasin Wiwongsak
- Www Sanfoundry ComUploaded byanis ansari
- Calc3_Chapter1Uploaded byRoy Vesey
- Matlab_Formulas_ListUploaded byKevin Dispo Montajes
- Basic Matlab MaterialUploaded byGogula Madhavi Reddy
- Mathematics Paper With Answer Solution Paper 1Uploaded byJatin Gupta
- Lab Report of Chap#3Uploaded byAhsan Ali
- Dsp Matlab & Two MarksUploaded bySATYA MOORTHY
- VectorsUploaded byRichmond Abriol Santos
- Draft Assignment 2Uploaded byBeatrix Gloria Tahapary
- Iowa Core Curriculum StandardsUploaded bytentinger
- 2-D Line Plot - MATLAB PlotUploaded bysuraj.atmos458
- Lecture 02Uploaded byAlvin Tung Kwong Choong
- 1MCOMP0203.PDFUploaded byteknikpembakaran2013
- Dynamics of Urban Bike Sharing Systems.pdfUploaded byGabriel Souza Pontes
- A Comparison of Age Level on Baseball Hitting KinematicsUploaded byRafael Escamilla
- Introduction to Matlab.pptUploaded byrafesh
- Resolution of ForcesUploaded byabhilibra14
- Lecture1 PhysicsUploaded byRizqi Utami
- JNU Previous Year Papers 2003-2012 PHYSICS Career EndaevourUploaded bySwashy Yadav
- Leader Online Test Series for Neet Ug 2018Uploaded byPrashant446
- EE2404_PS_Lab_Manual.docUploaded byswathi
- Activity 1 VectorsUploaded byJohn Doe
- Notes engineeringUploaded bychbarcenal
- Linear Control Systems Lab ManualUploaded byrub786
- PHYS 114 - new lecture notes.docxUploaded byJoshua Saldaña
- Chapter 3 Vectors InUploaded byAdo Elnando

- JavaMorph TutorialUploaded byManish Verma
- M.B.AUploaded byomingalkar
- Introduction to Functional Analysis MITUploaded bypranavsinghps
- A Continuum Mechanics Based Four Node Shell Element - Dvorkin & BatheUploaded byAndrés Mercado
- Samson Et Al-1999-International Journal for Numerical Methods in EngineeringUploaded byGoh Kek Boon
- Elemento Finito Primer CursoUploaded byJorge Lecona
- MatrixUploaded byVu Duc Hoang Vo
- 191761274 Eee Vi Power System Analysis and Stability 10ee61 Notes (1)Uploaded byMahesh O R
- 10.1002@esp.3661Uploaded byandresszz
- LU_CroutUploaded byGregory West
- Probability Impact AnalysisUploaded byMatthew Lynch
- A Memory Model for Scientic Algorithms on Graphics ProcessorsUploaded byravg10
- 2013 Regulation ME Structural EngineeringUploaded bymahendranmahe
- Plugin Syllabus W.E.F. 2011 Batch...Uploaded byRaja Vs
- Engineering journal ; Kinematics Analysis of a Novel 5-DOF Parallel Manipulator with Two Planar LimbsUploaded byEngineering Journal
- trip_distribution.pptUploaded bythouseef06
- mma.pdfUploaded bytrue_hind
- Lect-IV Vector SpaceUploaded byAbhijit Kar Gupta
- ABCD Matrix-A Unique Tool for Linear Two-wire Transmission Line ModellingUploaded bystudent_ujjwol3163
- 05625416.pdfUploaded byMed Nassim Kraimia
- Statistical Theory of Passive Location SystemsUploaded byyijun li
- lec2Uploaded bySoumyajit Bose
- Y_Bus_chap3Uploaded byJhala Mahipal
- Milling.pdfUploaded byDulis Dulis
- Funciones_de_Scilab_1800Uploaded byAgustin Jimenez Fernandez
- mathsUploaded bySunit Mishra
- 1506.06099 finite elementUploaded byGrantHerman
- 9A05702 Software TestingUploaded bysivabharathamurthy
- Advanced Book ClassicsUploaded byALAPATI-V-RAO
- Course Outline - BismathUploaded byGhazi Azhari