Q:

Create a set of anonymous functions to do length conversions and store them in a file named lenconv.mat. Call each a descriptive name, such as cmtoinch to convert from centimeters to inches

0

 Create a set of anonymous functions to do length conversions and store them in a file named lenconv.mat. Call each a descriptive name, such as cmtoinch to convert from centimeters to inches. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> clear

>> cmtoinch = @ (cm) cm/2.54;

>> inchtocm = @ (inch) inch * 2.54;

>> inchtoft = @ (inch) inch/12;

>> fttoinch = @ (ft) ft * 12;

>> save lenconv

>> clear

>> load lenconv

>> who

Your variables are:

cmtoinch fttoinch inchtocm inchtoft 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now