Revision –Matlab

1) Evaluate

ceil(1.2)   and  floor(1.9)

2) Matlab can be used as a calculator, show the steps of evaluating

3) Matlab can be used as a calculator, show the steps of evaluating

4) Assume that

What is the output of the following commands?

5) Evaluate the expression

,   x0=2

For scalar: x =1

And for vector:  [1;   1.5;    2;    2.5;   3]

6) Assume we have the following matrix

What are the results of the following expressions?

7) Draw and write the code of the following function

8)  Write the code that generates the following plot

9) Write code to build a Car class with:

position, velocity, and lanes properties,

the car constructor, and

accelerate function that takes rate and time

Then construct an instance of the car class and accelerate it with rate = 5 and time =2

10) Draw the Simulink model for the following mathematical system

11) Relation between Wavelength and Intensity

h is Planck's constant = 6.6261×10-34 J. s

c is speed of light = 2.9979×108 m/s

k = Boltzmann's constant  = 1.3807×10-23 J/K

wavelength range [1e-9, 3000e-9]

Write the code and plot the curve for:

T1 = 4500, T2 = 6000 T3 = 7500 K;