Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need Help in MATLAB Contours

  1. Apr 13, 2009 #1
    Here is what I am working on.


    I know it may seem stupid, but I am very new to MATLAB.

    I do not understand how to "create a grid in the x-y plane with domain r from .05 to .75
    and theta 0:5:360"

    I have created a "grid" using meshgrid....but I cant seem to wrap my head around doing it in polar

    I have done this to create a meshgrid before:

    Code (Text):
    x=[x1 x2];

    y=[y1 y2];

    Can someone help me extend this to Polar ?
  2. jcsd
  3. Apr 13, 2009 #2
    As a matter of fact, I guess I do not understand most of this...

    Why would I have to calculate the "distance to each point?" That is just r is it not?

  4. Apr 14, 2009 #3
    Can anyone help me to interpret this correctly? I am about to go off the deep end here.
  5. Apr 14, 2009 #4
    Yes, R is the distance from the charge to the point. You have to calculate it because MATLAB doesn't do polar grids. Do have to do the conversion from cartesian to polar coordinates yourself. Does this help?

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Need Help MATLAB Date
Matlab Help needed to fix a matlab code Nov 8, 2017
Need help with integral Dec 23, 2015
Need help in MATLAB Oct 10, 2013
Need help plotting Fourier series in matlab Sep 24, 2013
Need help with Matlab's Mapping Toolbox Feb 10, 2013