help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems in octave 5.1.0 in the function plot


From: arkkimede
Subject: Re: Problems in octave 5.1.0 in the function plot
Date: Fri, 31 May 2019 17:06:03 +0200

Yes, the picture that you report is exactly what I want to see.
What I see (on my Ubuntu 18.04 and Octave 5.1.0), if you imagine the picture divided in 2 equal parts, left one and right one,is the red curve only in the left one and nothing in the right one.
Also, if you change view, always the left part visible. When you realize a "top view" the curve reappear.
BR

Il giorno ven 31 mag 2019 alle ore 15:39 Dmitri A. Sergatskov <address@hidden> ha scritto:
On Fri, May 31, 2019 at 8:26 AM arkkimede <address@hidden> wrote:
>
> This is the minimum code that on
> Ubuntu 18.04
> Octave 5.1.0
> produces the error: if you rotate the picture, you will see only half red curve:
>
> %============== start script
> function conical_cut
> D2R = pi/180.;
> R2D = 180./pi;
>
> downTilt_d = 30;
> downTild_r = downTilt_d * D2R;
>
> % -------------------------------------------------
> % Equation that describe the cut with theta costant
> % -------------------------------------------------
> phi_d = 0:0.01:360;
> phi_r = phi_d * D2R;
> x = cos(downTild_r) * cos(phi_r);
> y = cos(downTild_r) * sin(phi_r);
> z = zeros(size(x)) - sin(downTild_r);
>
> h = figure;
>
> % ------------
> % Plot the cut
> % ------------
> plot3(x,y,z,'r');
> hold on;
> axis off;
> axis equal;
>
> % -------------
> % Plot the axis
> % -------------
> plot3([-1 1],[0 0],[0 0],'k');
> text([1.2],[0.2],[0],'x','fontsize',20);
>
> plot3([0 0],[-1 1],[0 0],'k');
> text([0],[1.1],[0],'y','fontsize',20);
>
> plot3([0 0],[0 0],[0 1],'k');
> text([0],[0],[1.1],'z','fontsize',20);
>
>
> %============= end script
>
> Thank you
>
>

This is what i got with octave 6.0. Not sure if this is what you are expecting.

Dmitri.
--

reply via email to

[Prev in Thread] Current Thread [Next in Thread]