[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46952] ezsurf should emit an error when given
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #46952] ezsurf should emit an error when given 5 inputs |
Date: |
Sat, 23 Jan 2016 21:43:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Update of bug #46952 (project octave):
Status: None => Confirmed
Summary: The axis are not correctly numbered => ezsurf should
emit an error when given 5 inputs
_______________________________________________________
Follow-up Comment #1:
The function ezsurf is not being called correctly in your example code.
Octave should probably issue an error rather than continue, but the easiest
thing is to fix your code.
R = 1;
H = 1.5;
fx = @(th,rho) rho.*cos(th);
fy = @(th,rho) rho.*sin(th);
fz = @(th,rho) rho.*H/R;
figure;
ezsurf(fx,fy,fz,[0,1],[0,2*pi])
ezsurf is being called with 5 arguments but that doesn't conform to any of the
accepted invocation methods.
-- Function File: ezsurf (F)
-- Function File: ezsurf (FX, FY, FZ)
-- Function File: ezsurf (..., DOM)
-- Function File: ezsurf (..., N)
-- Function File: ezsurf (..., "circ")
-- Function File: ezsurf (HAX, ...)
-- Function File: H = ezsurf (...)
I think you are looking to call
ezsurf (FX, FY, FZ, DOM)
>From the documentation,
If three functions are passed, then plot the parametrically defined
function `[FX (S, T), FY (S, T), FZ (S, T)]'.
If DOM is a two element vector, it represents the minimum and
maximum values of both X and Y. If DOM is a four element vector,
then the minimum and maximum values are `[xmin xmax ymin ymax]'.
>From your definition of
fx = @(th,rho)
it seems that the first variable should run from 0 to 2PI and the second from
0 to 1. Indeed, the following produces the correct plot.
ezsurf (fx,fy,fz, [0, 2*pi, 0, 1])
I changed the Summary to reflect the open issue.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46952>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/