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: Dmitri A. Sergatskov
Subject: Re: Problems in octave 5.1.0 in the function plot
Date: Fri, 31 May 2019 08:39:10 -0500

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.
--

Attachment: t1.png
Description: PNG image


reply via email to

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