0% found this document useful (0 votes)
112 views2 pages

Math Operations with Arrays in EPF3109

This document contains 6 questions regarding mathematics operations with arrays in MATLAB. [1] It asks to create a column vector that decreases from 38.5 by 3.5 increments to 0. [2] It asks to create a 5x3 matrix using vector notation with constant spacing. [3] It asks to calculate the value of a function for various x values using element-by-element operations. [4] It asks to define and manipulate vectors to create other vectors. [5] It asks to calculate the length of a fish at different ages using the von Bertalanffy growth law. [6] It asks to define vectors x and y and use them to calculate z in different expressions.

Uploaded by

Ain Nurfatihah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views2 pages

Math Operations with Arrays in EPF3109

This document contains 6 questions regarding mathematics operations with arrays in MATLAB. [1] It asks to create a column vector that decreases from 38.5 by 3.5 increments to 0. [2] It asks to create a 5x3 matrix using vector notation with constant spacing. [3] It asks to calculate the value of a function for various x values using element-by-element operations. [4] It asks to define and manipulate vectors to create other vectors. [5] It asks to calculate the length of a fish at different ages using the von Bertalanffy growth law. [6] It asks to define vectors x and y and use them to calculate z in different expressions.

Uploaded by

Ain Nurfatihah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

EPF3109 Lab Week 3: Mathematics Operations with Arrays

Question 1

Create a column vector in which the first element is 38.5, the elements decrease with
increments of -3.5, and the last element is 0. (A column vector can be created by the
transpose of a row vector).

Question 2

Create the following matrix by using vector notation for creating vectors with constant
spacing and/or the linespace command. Do not type individual elements explicitly.

5 0 6
4 0 6 

B  3 0 6
 
2 0 6
1 0 6 

Question 3

y
x 2
 2   x2  4 

For function 2 x , calculate the value of y for the following values of x


using element-by-element operations: 1,2,3,4,5,6,7.

Question 4

v   2 4 6 8 10 
Define the vector . Then use the vector in a mathematical expression
to create the following vectors:

1 1 1 1 1 
a
a)  2 4 6 8 10 
1 1 1 1 1 
b 2
b) 2 4 2
6 8 102 
2 2

c   1 2 3 4 5
c)
d   1 1 1 1 1
d)

Question 5

Fisheries commonly estimate the growth of a fish population using the von Bertalanffy
growth law:

L  Lmax 1  e  K  1  
Where Lmax is the maximum length, K is a rate constant, and  is a time constant. These

constants vary with the species of fish. Assuming Lmax  58cm , K  0.45 years , and
1

  0.65 years , calculate the length of a fish at 0, 1, 2, 3, 4, and 5 years of age.

Question 6

Define x and y as the vectors x=[1 , 3 ,5 , 7 , 9] and y=[2 ,5 , 8 , 11 ,14 ]

Then use them in the following expressions to calculate z using element-by-element


calculations.

x y2
a) z=
x+ y
b) z=x ( x2 − y )−( x− y )2

You might also like