Be the first to rate this file! 4 Downloads (last 30 days) File Size: 28.87 KB File ID: #5571

Units (updated)

by Wendell Scott Richardson

 

27 Jul 2004 (Updated 29 Jul 2004)

Converts between units with checks for unit consistency.

| Watch this File

File Information
Description

This is a simple update of the Units.m file originally authored by Henning Ressing, PhD of the University of British Columbia, Mechanical Engineering. This update checks for unit consistency. This file now supports parsecs as a unit of length conversion. Please contact me FIRST if this file does not work to your standards.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
units.m
This submission has inspired the following:
CHANGEUNIT, Unit Conversion Tools

MATLAB release MATLAB 5.3.1 (R11.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
03 Aug 2004 H R

>> Z=units(1,'in','Yotta')
Inconsistent unit - please check units and try again!
??? One or more output arguments not assigned during call to 'units'.

>> Z=units(1,'Yotta','in')
Z =
  1.0000e+024

04 Aug 2004 Wendell Scott Richardson

It should be noted that units(updated) only supports unit conversion within groups of items (as listed within the help function of this m-file). As "in" is a unit of length, and "Yotta" is unitless, units will not convert them. The proper function call to do this would be:

>>Z=units(1,'Yotta','1')

09 Sep 2004 Mark M

This needs to be fixed for temperature conversions for the second unit, line 980 to 987, change "c" to "x".

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
chemistry Wendell Scott Richardson 22 Oct 2008 07:28:28
physics Wendell Scott Richardson 22 Oct 2008 07:28:28
units Wendell Scott Richardson 22 Oct 2008 07:28:28

Contact us at files@mathworks.com