Let's assume you've got an experiment setup vhich includes a Sharp GP2D12 infrared distance sensor and a BasicX-24 microprocessor. The distance sensor uses a beam of infrared light to measure the...


Course:


Introduction to MATLAB Programming


Student Number:


180505005


Let's assume you've got an experiment setup vhich includes a Sharp GP2D12 infrared distance<br>sensor and a BasicX-24 microprocessor.<br>The distance sensor uses a beam of infrared light to measure the distance from the sensor to an<br>object; the sensor provides an output voltage that has a fairly complicated relationship to this<br>distance. The BasicX processor converts the voltage from the sensor into a number between zero<br>and one. Let us denote this number as x, and the distance (measured in inches) between the<br>sensor and object as d. The relationship between x and d is<br>34.63<br>d = -<br>- 5.162<br>2.54<br>Write a code / script which includes a FOR LOOP, computing the value of d for the values of x<br>whose total number is equal to the sum of the digits in your student number using the built-in<br>function generating linearly spaced vector in the inclusive range between zero and one and<br>returning an output variable named SolSen in the format just as shown below:<br>Notice: The number of rows below is equal to the the sum of the digits in your student number.<br>Example fiqures<br>Solsen =<br>0.1000<br>134.3063<br>0.1500<br>88.8601<br>0.2000<br>66.1370<br>

Extracted text: Let's assume you've got an experiment setup vhich includes a Sharp GP2D12 infrared distance sensor and a BasicX-24 microprocessor. The distance sensor uses a beam of infrared light to measure the distance from the sensor to an object; the sensor provides an output voltage that has a fairly complicated relationship to this distance. The BasicX processor converts the voltage from the sensor into a number between zero and one. Let us denote this number as x, and the distance (measured in inches) between the sensor and object as d. The relationship between x and d is 34.63 d = - - 5.162 2.54 Write a code / script which includes a FOR LOOP, computing the value of d for the values of x whose total number is equal to the sum of the digits in your student number using the built-in function generating linearly spaced vector in the inclusive range between zero and one and returning an output variable named SolSen in the format just as shown below: Notice: The number of rows below is equal to the the sum of the digits in your student number. Example fiqures Solsen = 0.1000 134.3063 0.1500 88.8601 0.2000 66.1370

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here