How can i plot Electric field graph of Electric dipole?
조회 수: 7 (최근 30일)
이전 댓글 표시
How can i plot graph with two different independent variable with one dependent variable? Like Electric field of dipole
댓글 수: 1
채택된 답변
Joseph Cheng
2015년 3월 5일
you can use the function quiver() examples on its use can be found http://www.mathworks.com/help/matlab/ref/quiver.html. So if position (x and y) about the dipole are your independent variables and the magnitude of the field is your dependent the quiver plot can show you at the x and y position the magnitude and direction of the field.
댓글 수: 2
Joseph Cheng
2015년 3월 5일
it has been a while but i'm taking a is the angle normal to dipole and R is the distance from the center point between the two poles. Then you can convert any X and Y coordinate into distance and angle.
r = sqrt(x^2+y^2)
a = atan2d(y,x).
추가 답변 (1개)
Antonio Cedillo Hernandez
2020년 4월 21일
Here you have the full MATLAB code explained (in spanish but the first comment is the code): https://www.youtube.com/watch?v=k9srU6aQfL0
댓글 수: 2
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!