# data[].attributes.body
b) To design the tensile and compression reinforcement area for the doubly reinforcement type

# data[].attributes.body
The rectangular reinforced concrete beams section as shown in Table 2 are required to design to carry the factored bending moment.
Using the Eurocode 2, learn on how to design the bending reinforcement of a rectangular beam.
Write OCTAVE function to handle the followings;
a) To design the tensile reinforcement area for the single reinforced type

---> Use IF…ELSE….END statement to control the script to design the reinforcement.

# data[].attributes.body
i) Perform multiplication, division, exponential elementwise operation on matrices A and C

# data[].attributes.body
Magic matrix
---> M = magic(3)

# data[].attributes.body
h) Multiply magic matrix with matrix C with OCTAVE

# data[].attributes.body
IdentityMatrixA = eye(3,3)

# data[].attributes.body
g) Add an identity matrix of same dimension with matrix A

# data[].attributes.body
T = A*B
U = A-B
V = A+B

# data[].attributes.body
f) Using OCTAVE, determine AB, A-B and A+B

# data[].attributes.body
S = (3.2*A) + (3.2*C)

# data[].attributes.body
R = 3.2*(A+C)

# data[].attributes.body
e) Using OCTAVE, solve 3.2(A+C) and 3.2A + 3.2C

# data[].attributes.body
P = A*B
---> (cannot calculate because the matrix size for A is 3x3 and B is 2x3.
---> r ≠ q

Q = B*A
---> (can calculate because the matrix size for B is 2x3 and A is 3x3.
---> r = q

# data[].attributes.body
d) Using OCTAVE, determine AB and BA

# data[].attributes.body
---> (can calculate because the matrix size for A is 3x3 and C is 3x3.  The matriz size is same

# data[].attributes.body
---> (can calculate because the matrix size for A is 3x3 and C is 3x3. The matriz size is same.

# data[].attributes.body
b) Using OCTAVE, compute A+C and C-A

# data[].attributes.body
a) Create the following matrices using OCTACE, denoting that to set all matrix location as zeros.

𝐴  =  [ 5       2       1
1        7      -3

6      −10     2/3 ]

𝐵  =  [ 11        5        3
2       6.54     1 ]

𝐶  =  [ 7        14        1
10       3        −2
8        −5        9 ]

# data[].attributes.body
d) Using OCTAVE, compute the maximum, mean and the summation of the population

# data[].attributes.body
c) Using a constant spacing, write the same arrays in a) in OCTAVE

# data[].attributes.body
b) Create separate column matrix in OCTAVE for storing the year and population

# data[].attributes.body
a) Create separate row matrix in OCTAVE for storing the year and the population

# data[].attributes.body
the result will appear like at the picture. All the commands in the command window have been deleted.

# data[].attributes.body
the result will appear like at the picture. The variable "a" at the workplace have been deleted.

# data[].attributes.headline
i) To save the current file using extension m

# data[].attributes.subject
i) To save the current file using extension m

# data[].attributes.body
- Click file
- find save workspace as...
- write your file name and save

# data[].attributes.headline
h) To clear all commands on your computer screen

# data[].attributes.subject
h) To clear all commands on your computer screen

# data[].attributes.body
- type "clc" in the command window
- press enter

# data[].attributes.headline
g) To delete one of the variables in the workspace as declared in task

# data[].attributes.subject
g) To delete one of the variables in the workspace as declared in task

# data[].attributes.body
- type "clear a" in the command window
- press enter

# data[].attributes.headline
f) To access each of the stored value to the created variables in task

# data[].attributes.subject
f) To access each of the stored value to the created variables in task

# data[].attributes.body
--> This steps can be done incase if we want to called the variables back after we have closed the octave apps.
- double click at the variables in command history to called the variable back in the command window and workplace.

# data[].attributes.headline
e) Perform the addition of square root of the first variable and the natural log of the second variable

# data[].attributes.subject
e) Perform the addition of square root of the first variable and the natural log of the second variable

# data[].attributes.body
- used the same variable that have been defined previously
- calculate : sqrt(d) + log(c)

# data[].attributes.headline
d) Perform the multiplication of the stored variables

# data[].attributes.subject
d) Perform the multiplication of the stored variables

# data[].attributes.body
- used the same variables in (c)
- calculate : d = c * a

# data[].attributes.body
ii - Do the same steps as in (i)
- and now look at the workplace, the new ans will update at the workplace.

# data[].attributes.headline
b) To store value 3.41 and 5/6 to a selected variable in the workplace

# data[].attributes.subject
b) To store value 3.41 and 5/6 to a selected variable in the workplace

# data[].attributes.body
i - insert value 3.41 in the command window, then press enter
- the value will returned by ans = 3.41.
- look at the workplace, the ans will automatically defined as double.

# data[].attributes.headline
c) Perform addition of the stored variables

# data[].attributes.subject
c) Perform addition of the stored variables

# data[].attributes.body
- use "=" to assign the variables, keeps the data in the memory to use it again.
Ex 1 : a = 1
b = 2
c = a + b
- the answer will evaluate and returned by c = 3
- the types of variable will be automatically display at the workplace. We don't need to defined the types of variable by ourself.

# data[].attributes.body
the result will appear like this :

# data[].attributes.headline
LAB 1                           a) To create an octave file

# data[].attributes.subject
LAB 1                           a) To create an octave file

# data[].attributes.body
- click file
- find new
- then click the new script