bugGNU Octave - Bugs: bug #46952, ezsurf should emit an error when...

 
 

bug #46952: ezsurf should emit an error when given 5 inputs

Submitter:  None
Submitted:  Sat 23 Jan 2016 12:50:55 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  F. P Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 Mar 2016 04:11:25 AM UTC, comment #2: 

I made the input validation stricter for ezplot functions in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/96c768d898f0).  Closing report.

Rik <rik5>
Group administrator
Sat 23 Jan 2016 09:43:37 PM UTC, 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.

Rik <rik5>
Group administrator
Sat 23 Jan 2016 12:50:55 AM UTC, original submission:  

When plotting a cone, the x and y axis are not correctly numbered.


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #36132:  graficarej.m added by None (415B - application/vnd.wolfram.mathematica.package)
file #36133:  graficarej.m added by None (415B - application/vnd.wolfram.mathematica.package)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-30 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-01-23 rik5 StatusNone Confirmed
        SummaryThe axis are not correctly numbered ezsurf should emit an error when given 5 inputs
    2016-01-23 None Attached File- Added graficarej.m, #36132
        Attached File- Added graficarej.m, #36133

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code