No BSD License  

Highlights from
linspace_round

5.0

5.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 2.83 KB File ID: #15409

linspace_round

by Andy Eichelberger

 

23 Jun 2007 (Updated 25 Jun 2007)

Creates linearly spaced vector with "rounded" intervals.

| Watch this File

File Information
Description

LINSPACE_ROUND generates a row vector of equally spaced points that bound the input values. The spacing is chosen such that tenths and quarters are considered "rounded" fractions.

Example: If X1 = 3.4, X2 = 7.5, N = 6,
 then LINSPACE_ROUND(X1,X2,N) returns:
 [2.8 3.5 4.2 4.9 5.6 6.3 7.0 7.7]
(in words, choosing spacing of 0.7 will produce about 6 points that bound X1 and X2)

This is useful in having automatically chosen data bins, contour intervals, graph tick marks, etc., that are pleasing to the eye.

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
30 Jul 2008 Frank Christian Pott

Exactly what I needed. Thanks!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
linspace Andy Eichelberger 22 Oct 2008 09:16:58
colon Andy Eichelberger 22 Oct 2008 09:16:58
round Andy Eichelberger 22 Oct 2008 09:16:58
mathematics Andy Eichelberger 22 Oct 2008 09:16:58

Contact us at files@mathworks.com