Code covered by the BSD License  

Highlights from
cosspace

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.5 KB File ID: #28337
image thumbnail

cosspace

by Sky Sartorius

 

30 Jul 2010 (Updated 12 Oct 2010)

Generates cosine- or acos-spaced vector with elements clustered or sparse at the endpoints

| Watch this File

File Information
Description

Utility function operates with no loops, so is of comparable speed to LINSPACE.

Using the same syntax as LINSPACE, COSSPACE makes a cosine spaced vector, clustering the elements toward the endpoints with greater spacing in the middle:
||_|__|___|____|_____|_____|____|___|__|_||

Given negative vector length, COSSPACE returns an inverse cosine spaced vector with elements sparse toward the endpoints:
|_____|____|___|__|_|_|_|_|_|__|___|____|_____|

An optional input in addition to the endpoints and the number of elements lets you choose the intensity of the clustering.

Acknowledgements

Cosspace inspired this file.

This file inspired Core: Conceptual Optimization Of Rotorcraft Environment, Linspace3: Linearly Spaced Vector Defined By Three Points, and Sinspace.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
clustered, clustering, cosine, distributed, distribution, linspace, logspace, miscellaneous, space, spaced, spacing, utilities, utility, vector
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
02 Aug 2010

added inverse cosing spacing

12 Oct 2010

improved algorithm; added optional weighting for less intense clustering

Contact us