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

MATLAB 3D graphs help

  1. May 17, 2010 #1
    Hello everybody.

    I need help with smoothing 3D graphs made in matlab. I have the following code

    %Simulacion
    %Declarando variables
    I=500; %Corriente
    a=2; %Radio
    h=8; %Altura
    h2=12; %Altura 2
    u=1.2566e-006; %permeabilidad magnetica
    w=6.832; %2*pi
    >> Ke=9*10^9;
    >> x=(-15:0.1:15);
    >> y=(0:0.1:15);
    >> [X,Y]=meshgrid(x,y);

    >> %CASO CAMPO ELECTRICO
    >> %Dos cables
    >> Exx=Ke*(10^-6)*((((X+a)./((X+a).^2+(Y-h).^2+eps))-((X+a)./((X+a).^2+(Y+h).^2+eps)))-(((X-a)./((X-a).^2+(Y-h).^2+eps))-((X-a)./((X-a).^2+(Y+h).^2+eps))));
    >> Eyy=Ke*(10^-6)*((((Y-h)./((X+a).^2+(Y-h).^2+eps))-((Y+h)./((X+a).^2+(Y+h).^2+eps)))-(((Y-h)./((X+a).^2+(Y-h).^2+eps))-((Y+h)./((X+a).^2+(Y+h).^2+eps))));
    >> E3D2=sqrt(Exx.^2+Eyy.^2); %CAMPO ELECTRICO TOTAL
    >> surfc(X,Y,E3D2)

    When i graph it, there are some weird peaks, this is the electric field of two power lines in horizontal in 10 meters of heigth, located at a/-a distance from each other. Im doing to for three lines (the graph gets worse). I think the top of the peak supossed to be more smooth, because when i use contour, you can see some rhombus, and it supossed to be a circles. Is there a way to smooth 3d graphs in MATLAB?

    PS: My english isn to good so i apologize if i wrote something wrong or bad spelled.
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: MATLAB 3D graphs help
  1. 3D Plot in Matlab (Replies: 6)

Loading...