Professional Documents
Culture Documents
Assignment 2 Cpe
Assignment 2 Cpe
Semester 1, 2019/20
Assignment 2
Question 1:
1) Figure 1 shows the command window results obtained from the data shown in Table
1. Create the MATLAB® code for displaying pressure value demonstrated by
different pressure sensor of a chemical plant unit as shown in Figure 1.
Table 1: Pressure sensor vs Value (kPa)
Pressure 1 2 3 4 5 6 7 8 9 10 11 12 13
sensor
Value 99 40 43 20 50 39 60 29 20 10 5 60 80
(kPa)
(9 marks)
Question 2:
Consider that an acceptable temperature in between 200°C and 250°C for a distillation
column. Write the MATLAB’s code using if command for the problem that specifies that the
temperature of a distillation column shows
Consider a chemical company has a balance of money of $50k before closing down. The
company plan to invest that amount of money in a third party company that generates a return
of 8% annually.
a) Write a MATLAB code using while loop to show how many years are needed to
reach $1million.
(6 marks)
b) Using fplot code to plot year vs the number of years that reach $1million from $50k
(3 marks)