Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2) Problem 2: Registration Fee (10 pts Problem Statement: Based on an automobile

ID: 3594243 • Letter: 2

Question

2) Problem 2: Registration Fee (10 pts Problem Statement: Based on an automobile's model year and weight a state can determine the car's weight class and registration fee using the following schedule: Model Year Weight Weight Class Registration Fee (S) 16.50 25.50 46.50 27.00 30.50 52.50 19.50 52.50 1970 or earlier Less than 2700 lbs. 2700 to 3800 lbs. More than 3800 lbs 1971 to 1979 Less than 2700 lbs. 2700 to 3800 lbs. More than 3800 lbs. Less than 3500 lbs. 1980 or later 3500 or more lbs Pae 2 of4 Using this information write a MATLAB function (Registration Fee.m) that accepts the year and weight of an automobile and determines and displays the weight class and registration fee for the car

Explanation / Answer

First create a text file automobilem.txt

codes for import a text file

filename = ‘automobilem.txt’;

delimiterIn = ‘ ‘;

headerlinesIn = 1;

X = importdata(filename,delimiterIn,headerlinesIn);

% view data

For I = [1:4]

    disp(X.colheaders{1,i})

    disp(X.data(:, i))

    disp(‘ ‘)

end

for input by the user

a = input(“enter model year and weight”)

b = find( a= = X)

disp(b)

if b = 0

     b = input(“ nothing”)

end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote