Project

Create a row and column vector in Matlab

ROW VECTOR:

Two Methods:

1) A=[first value:increment:last value]

ex:

A=[0:1:9]

A =

0 1 2 3 4 5 6 7 8 9

2) A=linspace(first value,last value,increments)

ex:

A=linspace(0,9,10)

A =

0 1 2 3 4 5 6 7 8 9

COLUMN VECTOR:

Two Methods:

1) A=[first value:increment:last value]\'

ex:

A=[0:1:9]\'

A =

0
1
2
3
4
5
6
7
8
9

2)A=linspace(first value,last value,increments)\'

ex:

A=linspace(0,9,10)\'

A =

0
1
2
3
4
5
6
7
8
9

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.