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

Using MATLAB: Suppose you are creating a script in Matlab for an individual that

ID: 3833214 • Letter: U

Question

Using MATLAB: Suppose you are creating a script in Matlab for an individual that builds a structure named 'car' and includes the fields: make, model, year, mileage, class (car, van, truck, etc) and color. Have you script include 3 vehicles of your choosing then have the user input their own vehicles (use a loop and continue asking until the user is done entering vehicles). When the user adds a specific make, model and year check the current array for duplicates. (The duplicate check needs to look for matches of make, model and year only.) If there is a duplicate, return a message to the user that says ’match found’ then display their data and the data of the duplicate. However, if there is no match, return the user entered values only. Ask the user if they would like to view all vehicles, and if they choose yes display all vehicles in a table with appropriate headings.
Please show all work. Thanks in advance! Using MATLAB: Suppose you are creating a script in Matlab for an individual that builds a structure named 'car' and includes the fields: make, model, year, mileage, class (car, van, truck, etc) and color. Have you script include 3 vehicles of your choosing then have the user input their own vehicles (use a loop and continue asking until the user is done entering vehicles). When the user adds a specific make, model and year check the current array for duplicates. (The duplicate check needs to look for matches of make, model and year only.) If there is a duplicate, return a message to the user that says ’match found’ then display their data and the data of the duplicate. However, if there is no match, return the user entered values only. Ask the user if they would like to view all vehicles, and if they choose yes display all vehicles in a table with appropriate headings.
Please show all work. Thanks in advance! Suppose you are creating a script in Matlab for an individual that builds a structure named 'car' and includes the fields: make, model, year, mileage, class (car, van, truck, etc) and color. Have you script include 3 vehicles of your choosing then have the user input their own vehicles (use a loop and continue asking until the user is done entering vehicles). When the user adds a specific make, model and year check the current array for duplicates. (The duplicate check needs to look for matches of make, model and year only.) If there is a duplicate, return a message to the user that says ’match found’ then display their data and the data of the duplicate. However, if there is no match, return the user entered values only. Ask the user if they would like to view all vehicles, and if they choose yes display all vehicles in a table with appropriate headings.
Please show all work. Thanks in advance!

Explanation / Answer

car = struct('make',{'v1','v2','v3'},'model',{'11','12','13'},'year',{'2017','2017','2017'},'mileage',{'21 lit','26 lit','24 lit'},'class',{'automatic car','van','truck'})
   k = input('Enter 1 if you want to enter some records: ');
   fields = fieldnames(car)
   i = 1
   if k == 1
      car.(fields{i})=input('enter the value for make = ')
      car.(fields{i+1})=input('enter the value for model = ')
      car.(fields{i+2})=input('enter the value for year = ')
      car.(fields{i+3})=input('enter the value for mileage = ')
      car.(fields{i+4})=input('enter the value for class = ')


   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