Help starting two dimensional vector plot (meshgrid and quiver) problem

조회 수: 1 (최근 30일)
Phil P
Phil P 2019년 10월 31일
편집: Cyrus Tirband 2019년 10월 31일
I'm trying to find the right way to set up this exercise but I'm still a very basic user and don't know much of the functions I should use.
"A coaxial cable has an inner conductor with radius a and is surrounded by a grounded thin conductive shell of radius b. Assume the surface charge density on the inner conductor is p. Make a two dimensional vector plot of the electric flux density D for the cross section of the coaxial cable. Use a meshgrid of 0.75mm with limits of -15cm<x<15cm. At each rdi point you should plot the vectors of the electric flux density using the quiver command."
Is there anyone able to make a bulletpoint list (variables and relative functions) I can follow to attempt a solution to the problem? Thanks!

답변 (1개)

Cyrus Tirband
Cyrus Tirband 2019년 10월 31일
편집: Cyrus Tirband 2019년 10월 31일
  • Use the maxwell equation to determine the D inside the cable. Hint: define gaussian surface which is a concentric cylinder with radius r, with
  • Make a meshgrid of x and y with the required spacing with
[x,y] = meshgrid(-15:0.075:15);
  • The electric flux density you find will be a function of x^2+y^2, and its direction will be with ϕbeing given by:
phi = atan2(y,x);
  • Quiver takes 4 arguments: the x grid points, the y gridpoints, the x component, and the y component. Write your code to calculate the x component of D and the y component of D, noting that D is zero inside the inner conductor and outside the outer conductor.
Dx = ...
Dy = ...
  • Finally, use quiver to generate the required plot
quiver(x,y,Dx,Dy)

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by