|
From: | Doug Stewart |
Subject: | Re: again a surface-problem |
Date: | Sun, 12 Nov 2017 17:01:25 -0500 |
On Sun, Nov 12, 2017 at 4:28 PM, Leo Baumann <address@hidden> wrote:Hello,
this is the correct diagram evaluated outside Octave:
www.leobaumann.de/newsgroups/vertDipolOPG_MuPAD.jpg
This is the wrong diagram evaluated with Octave:
www.leobaumann.de/newsgroups/vertDipolOPG_Octave.png
The problem is that the correct diagram shows a lot of lobes which are not shown in the with Octave evaluated diagram. Is that a problem of ezsurf() or did I make a mistake? I hope I have set the " .*, ./ " all correct this time.
I don't think you have a mistake in the programme.I think it is a resolution problem. if you use 30 for both plots then you see the same number if lobes in the first plot as you see rings in the second plot. If you do 1000 for both then it is hard to see all the rings in the second plot.I tried 30 and 90 and 120 and saw that the 2 plots follow each other.maybe a better colouring pattern is needed?
This is the Octave-script:
clc;
clear all;
h=1/2;b2=12;l=1;wh=0;
c=@(the,phi1) abs((cos(pi*h/l*cos(phi1))-cos(pi*h/l))./sin(phi1)) \
*2 .*abs(cos(pi*2*(b2+h/2)/l*cos(phi1)));
phi1=linspace (-pi/2, pi/2, 1000);
polar(phi1+pi/2, c(wh,phi1));
set (gca, "rtick", 0.2:0.2:2, "ttick", 0:10:180);
title ("Vertikaldiagramm");
#print("vertDipolOPG0.png", "-dpng");
input("weiter - <RETURN>", "s");
ezsurf(@(the,phi1) c(the,phi1).*cos(the).*sin(phi1),\
@(the,phi1) c(the,phi1).*sin(the).*sin(phi1),\
@(the,phi1) c(the,phi1).*cos(phi1), [-pi, pi, -pi/2, pi/2] ,30);
title ("Antennendiagramm");
axis equal;
#print("vertDipolOPG_Octave.png", "-dpng");
Thanks - Regards - Leo
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
--
[Prev in Thread] | Current Thread | [Next in Thread] |