Code covered by the BSD License  

Highlights from
UnitConvert

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

UnitConvert

by Christophe Tilman

 

27 Aug 2009

this script allow conversion between various engineering units.

| Watch this File

File Information
Description

list=UNITCONVERT give a list of available categories (useful to populate a popupmenu for example)

units=UNITCONVERT('category') give a list of available units for one category

category=UNITCONVERT('unit') give the category name for that unit

DataOut=UNITCONVERT(DataIn,'UnitIn') convert DataIn(matrix) to Standard Unit:
                    acceleration:meter/sec²
                    angle:degree
                    area:meter²
                    computer:bit
                    concentration:mole/liter
                    Density:kilogram/meter³
                    Distance:meter
                    Energy:joule
                    Flow:liter/minute
                    Force:newton
                    Light:lux
                    Mass:kilogram
                    Power:watt
                    Pressure:pascal
                    Rotation:revolution/second
                    Speed:meter/second
                    Time:second
                    Torque:newton meter
                    Volume:cubic meter
                    Volume - Dry:liter
                    Without Dimension:[]

DataOut=UNITCONVERT(DataIn,'UnitIn','UnitOut') convert DataIn(matrix) from UnitIn to UnitOut

Exemple:
   UnitConvert(500,'meter','kilometer')
   ans =
   0.5000

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data export Christophe Tilman 27 Aug 2009 10:46:39
data import Christophe Tilman 27 Aug 2009 10:46:39
data exploration Christophe Tilman 27 Aug 2009 10:46:39
engineering units Christophe Tilman 27 Aug 2009 10:46:39
unit conversion Christophe Tilman 27 Aug 2009 10:46:39

Contact us at files@mathworks.com