4.0

4.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 6.12 KB File ID: #5863

CHANGEUNIT

by Mukhtar Ullah

 

13 Sep 2004 (Updated 05 Jan 2005)

CHANGEUNIT (converts between units).

| Watch this File

File Information
Description

CHANGEUNIT
    CHANGEUNIT(x,'unit1','unit2') - Converts array x from physical unit1
    to unit2
 Example: changeunit(1,'in','mm') = 25.4

This is a very compact/fast/simple version of units.m(by Henning Ressing) which has been very useful to me but is not very easy to read because of a flood of switch-case statements.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Units (updated)
This submission has inspired the following:
Unit Conversion Tools

MATLAB release MATLAB 7 (R14)
Other requirements The file makeunits was used to generate units.mat and is not really needed; but it can be useful for those who want to extend this function
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
12 Jul 2005 Matt Allen

Nice Utility. Seems to work fine.

Please login to add a comment or rating.
Updates
15 Sep 2004

correction in the description

17 Sep 2004

changed category to Miscellaneous

17 Sep 2004

a bug fixed(with prefixes)

28 Sep 2004

now one file(no .MAT-file needed). To speed up, one may make a .MAT file by running lines 43-110; then delete these lines and load that .MAT file.

29 Oct 2004

improved help documentation

30 Nov 2004

renamed to avoid a conflict with control systems toolbox

05 Jan 2005

compact code

Tag Activity for this File
Tag Applied By Date/Time
units Mukhtar Ullah 22 Oct 2008 07:31:24
conversion Mukhtar Ullah 22 Oct 2008 07:31:24
change unit Mukhtar Ullah 22 Oct 2008 07:31:24
utilities Mukhtar Ullah 22 Oct 2008 07:31:24
miscellaneous Mukhtar Ullah 22 Oct 2008 07:31:24

Contact us at files@mathworks.com