views:

258

answers:

1

Hi, I have a task to draw electrostatic field between
two electrodes( at given sizes and shape ),
what i have now is that i draw the electrodes with area plot (area(elect_x,elect_y))
the graph looks like this:

------------------.---
                  |..
     .---.        |..
     |...|        |..
.----....|        |..
|........|        |..
----------------------

and now i would need to draw inside this probably a mesh, showing the field.
Is there any way to do it, or i´m on a wrong way?
Thank you very much for every guide

+1  A: 

First, if you want to overlay multiple plots in the same axes, type

hold on

before you plot the second graph (or set the 'NextPlot' property of the axes to 'add'), so that the first plot is not erased when the second one is drawn.

To show electrical field, you may want to have a look at quiver, so you can visualize both direction and strength of the fiels. Also check out is demo of quiver to get and idea how you could show field strength with colors.

Jonas
Hi, i have been experimenting with quiver and i found it really useful, but now i´m stuck because i have no idea, how to describe my electrodes as a 3D function, i know, its rather a mathematical problem now but i would be grateful for any answer or guide for this
mirekys