Reference no: EM133550349
Complete each step below in MATLAB and take a screenshot to include in your CEIS301 Project Template Module 2 Deliverable. Before you work on this assignment, please make sure to watch Lesson 4: Introduction to MATLAB. All the steps below are explained in the lesson.
STEP 1
Define two numeric variables with names "x" and "y". Assign the first number of your D number to "x" and assign the second number of your D number to "y".
Perform division between "x" and "y" and display the value using "long" format.
Take a screenshot of your code and the answer to place in the deliverable power point file.
STEP 2 My D number is 41177462
Add all numbers in your D number and print on screen using the "fprintf" function the statement "The addition of all numbers in my D number is ..." The three dots should be replaced by the addition of all numbers in your D number and should include two decimal numbers.
Take a screenshot of your code and the answer to place in the deliverable power point file.
STEP 3
Write a for loop to calculate the square of 0,2,4,6,8,10,12,14,16,18, and 20 store them in an array. Label the array as A.
In the same for loop, create another array to keep the numbers 0,2,4,6,8,10,12,14,16,18, and 20. Label the array as B.
Use the two arrays to plot B versus A. Please note that the numbers in B should be displayed on x axis and the numbers in A should be displayed on y axis.
Place a title which should be your full name for the graph.
Take a screenshot of your code and the graph to place in the deliverable power point file.