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
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:10| Question number:16.10
All Answers
total answers (1)
>> 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