You are on page 1of 4

MTH643 Assignment 1 - Due Date: December 4, 2023 Fall 2023

(Please go to Page 2 for the instructions and the Question of this Assignment.)

Student’s Answer Sheet

Page 1 of 4
MTH643 Assignment 1 - Due Date: December 4, 2023 Fall 2023

Student ID:
Digits of your Student ID:
Digits of your Student ID in Reverse:

PASTE SCRIPT FILE BELOW

PASTE FIGURE FILE BELOW

Assignment # 01 MTH643 (Fall 2023)


Total Marks: 10
Due Date: 04-12-2023
DON’T MISS THESE: Important instructions before attempting the solution and submission
of this assignment:

Page 2 of 4
MTH643 Assignment 1 - Due Date: December 4, 2023 Fall 2023
 Lectures 2-6 are encompassed in Assignment 1.

 All students (of both sections) shall complete this Assignment.

 All your answers, such as student ID, etc., MATLAB script and Figure must be put inside
the allocated boxes (fields) provided in the Student’s Answer Sheet.

 Only the Student’s Answer Sheet will be marked. So, you may choose to only upload
your Student’s Answer Sheet. Answers written outside of the boxes may get Zero mark.

 Any copied work, for example, script and/or figure of some other student’s ID will get
Zero mark.

 Assignment 1 is due on December 04, 2023.

 Properly Upload the Student’s Answer Sheet completed in MS Word format on LMS as
per the previous practice.

QUESTION: CAREFULLY READ AND PERFORM THE FOLLOWING STEPS,


a. Create a new script in MATLAB software and name it twoLinePlot.m
b. Declare a vector X which has nine entries 1, 2, 3, 4, 5, 6, 7, 8, 9
c. Declare a vector Y1 which also has nine entries. These entries must be the nine digits of
your Student ID. For example, a student having ID MC210345678 will take the entries as 2,
1, 0, 3, 4, 5, 6, 7, 8
d. Declare a vector Y2 which also has nine entries. These entries must be the nine digits of
your Student ID written but in reverse order. For example, a student having ID
MC210345678 will take the entries as 8, 7, 6, 5, 4, 3, 0, 1, 2
e. Draw the following two plots in the same figure:
i. Plot between X and Y1 with X taken along the x-axis and Y1 along the y-axis. This plot
must be in red color and with asterisk marker.
ii. Plot between X and Y2 with X taken along the x-axis and Y2 along the y-axis. This plot
must be in blue color and with diamond marker.
f. Label the x-axis as ‘X’
g. Label the y-axis as ‘Y1 and Y2’
h. Give the figure a title of your student ID. For example: a student having ID MC210345678
will make title of ‘Student ID = MC210345678’
i. Create a legend to describe the two lines in the figure. The legend entries must be ‘My
Student ID’ for the red line and ‘MY Student ID in Reverse’ for the blue line.
j. Run the script to verify that everything runs right. And save the figure in .jpg format.

AND THEN:
 Copy and paste your script file in the answer sheet inside the box titled Script File.
 Copy and paste your .jpg figure file in the answer sheet inside the box titled Figure File.

A sample of Student’s Answer Sheet:

Please find below a sample Student’s Answer Sheet for a dummy Student ID: MC210345678
You will do all of your work with your actual student ID. Otherwise; you may get Zero mark.
Any student using this sample as his/her answer will also get Zero mark.

Page 3 of 4
MTH643 Assignment 1 - Due Date: December 4, 2023 Fall 2023

Page 4 of 4

You might also like