5.0

5.0 | 1 rating Rate this file 106 downloads (last 30 days) File Size: 5.76 KB File ID: #19805

EZIPLOT

by Jiro Doke

 

05 May 2008 (Updated 05 May 2008)

Code covered by BSD License  

Interactive EZ Function Plotter

Download Now | Watch this File

File Information
Description

The function plots in MATLAB allows you to easily visualize functions:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/f16-6011.html#f16-16089

This "eziplot" will create an interactive plot where all of the parameters become tunable. Just pass the function as an anonymous function, and it will automatically detect the parameters.

Any of the following function plots are supported: ezcontour, ezcontourf, ezmesh, ezmeshc, ezplot, ezplot3, ezpolar, ezsurf, ezsurfc, fplot

Created in R2008a, but should work in older releases.

Example:
  a = 1;
  eziplot({@(x) sin(a*x)});

  a = 1;
  b = 2;
  f2 = @(t) a*sin(b*t);
  f3 = @(t) b*cos(a*t);
  eziplot({f2, f3})

  a = 1;
  b = 1;
  f4 = @(x,y) y./(1 + a*x.^2 + b*y.^2);
  eziplot({f4}, 'plotfcn', 'ezmeshc');

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
05 May 2008 John D'Errico

Excellent help, that covers many of the cases that you might want to consider. It is lacking though. The figure shown on the web site shows a function parameterized by a pair of variables: (a, b). These parameters then result in a pair of sliders on the figure.

While that may be very nice as a feature, it is NEVER alluded to in the function help. I had to return to the website description to see an example of how this is accomplished. Since this seems to be one of the significant ways to use this code, even perhaps the most interesting way, I'd have expected to see some indication of that in the help. Tsk, tsk.

A very nice utility otherwise. I'll return to give this the rating it deserves when the help is repaired.

05 May 2008 John D'Errico

Sorry. Ignore my previous comment. I looked at the help for ezplot, not eziplot. Eziplot is correct, and as I said, quite nice to use.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Jiro Doke 22 Oct 2008 10:00:03
plotting Jiro Doke 22 Oct 2008 10:00:03
interactive Jiro Doke 22 Oct 2008 10:00:03
ezcontour Jiro Doke 22 Oct 2008 10:00:03
ezcontourf Jiro Doke 22 Oct 2008 10:00:03
ezmesh Jiro Doke 22 Oct 2008 10:00:03
ezmeshc Jiro Doke 22 Oct 2008 10:00:03
ezplot Jiro Doke 22 Oct 2008 10:00:03
ezplot3 Jiro Doke 22 Oct 2008 10:00:03
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com