Let us worry about your assignment instead!

We Helped With This MATLAB Programming Homework: Have A Similar One?

SOLVED
CategoryProgramming
SubjectMATLAB
DifficultyUndergraduate
StatusSolved
More InfoMatlab Assignment Help Service
07591

Short Assignment Requirements

I should give the details of my solutions and not just the final results.I must submit the Matlab code well commented as .m Matlab files. Also I must submit all figures and relevant plots as part of my work as a single file. So i must submit it as .m file and word document .

Assignment Description

Course Code: M106

Course Title: Introduction to MATLAB programming

Tutor Marked Assignment

Cut-Off Date: TBA                                                                                    Total Marks: 80

Contents

Question 1: 20 marks

Question 2: 16 marks

Question 3: 25 marks

Question 4: 19 marks

 

This TMA covers chapters 1, 2, 3, 4 and 5. It consists of four questions. Please solve all questions. You should give the details of your solutions and not just the final results. You must submit your Matlab code well commented as .m Matlab files. Also you must submit all figures and relevant plots as part of your work as a single file.

Plagiarism Warning:

As per AOU rules and regulations, all students are required to submit their own TMA work and avoid plagiarism. The AOU has implemented sophisticated techniques for plagiarism detection. You must provide all references in case you use and quote another person's work in your TMA. You will be penalized for any act of plagiarism as per the AOU's rules and regulations.

 

Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA work):

I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized any other person's work. I have provided all references of information that I have used and quoted in my TMA work.

Name of Student:

Signature:

Date:

 

Question 1: [20 marks]

In projectile motion, at any time (t), the projectile's horizontal (x) and vertical (y) displacement are:

 

 

 

where is the initial velocity and q is the initial launch angle.

{displaystyle heta }

Ali kicks the ball and ball does projectile motion with an initial launch angle (q) of 53° and its initial velocity is 10 m/s.

 

a) Make a plot of the displacement coordinates (x,y) between t = 0 and  t = 2s.    (7 marks)

 

b) Complete the plot with a title, grid, xlabel and ylabel.                                          (4 marks)

 

c) Using the Matlab commands ‘max’ and ‘find’ locate the maximum height it can reach then highlight this point with red stem (using ‘stem’ plot).                                             (7 marks)

 

d) Using the figure tool ‘Data cursor’, find the horizontal range (d) of the ball. Please note that the horizontal range is the horizontal distance it has travelled when it returns to its initial height (@ 0).                                                                                                            (1 mark)

 

e) Insert a text saying ‘The horizontal range (d)’ near the located data cursor point.

(You need to paste a snapshot of the figure as shown below)                                  (1 mark)

 

 

 

 

 

Question 2: [16 marks]

Write a program to compute the total payment for a salesman who is paid a basic salary and a commission, where             

Commission =                 7% of sales                                          if 300 < sales <= 500

                                    10% of sales + 50 $                 if sales is more than 500 $                 

The output of the script should include the basic payment, the computed commission and the total payment all with 2 significant figures.

Sample run#1:

 

Please enter the basic payment: 600

Please enter the sales: 700

Basic payment= 600.00

Commission = 120.00

Total Payment = 720.00

 

Sample run#2:

 

Please enter the basic payment: 600

Please enter the sales: 400

Basic payment= 600.00

Commission = 28.00

Total Payment = 628.00

 

Sample run#3:

 

Please enter the basic payment: 600

Please enter the sales: 100

Basic payment= 600.00

Commission = 0.00

Total Payment = 600.00

 

 

Question 3: [25 marks]

§ Write a function get_Data that reads and returns the data of a true-false exam of 5 questions for a class of 5 students, e.g. (TFTFT;TTTFF;FFTTT;TFTFF;FFFFF)            (2 marks)

 

§ Write a function get_Model to read and return the model answer of a true-false exam, e.g. (TFTTT).                                                                                                    (2 marks)

 

§ Write a function get_Result that accepts the answers of the students and model answer then finds and returns their results in 1D array. (The result is the number of correct answers that each student has got out of 5).                                            (5 marks)

 

§ Write a function delete that accepts the answers of the students and the result array to eliminate the student’s answer with the smallest mark together with his/her mark from the result array.                                                                                                       (6 marks)

§ Write a function print to print the full data of all remaining students.        (5 marks)

 

§ Write the main script that calls the above methods in their respective order.      

                                                                                                                        (5 marks)

 

Sample run:

 

Please enter the students' answer ['TTFFF';'TFTFT';'TTTTT';'FFFFF';'TFTFT']

Please enter the model answer 'TFFTT'

 

Student’s Data

-------------------

TFTFT    3

TTTTT  3

FFFFF    2

TFTFT    3

 

Question 4: [19 marks]

Implement the following flowchart in Matlab using:

a)       for loop                                (5 marks)

b)      while loop                           (6 marks)

c)       not using loops at all       (5 marks)

d)      state in English what is the job

       of the flowchart                (3 marks)

 

 

 

 

 

 

 

 

 

“End of Questions”

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On

soc fb soc insta


Paypal supported