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 15:26:21 +0200

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


Il giorno ven 31 mag 2019 alle ore 14:41 Dmitri A. Sergatskov <address@hidden> ha scritto:

To get a meaningful response you need to post a self-contained code
that demonstrate the problem.

Regards,

Dmitri.
--

reply via email to

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