Project

Basic commands in Matlab

AIM : To create a row and column vector in Matlab.

BACKGROUND INFORMATION : Vectors are a type of matrix having only one column or one row. A vector having only one column is called a column vector, and a vector having only one row is called a row vector.

OBJECTIVE : The objective of this program is to type in the commands to create a row and column vector in Matlab.

MATLAB CODE :

% A program to create a row vector and a column vector

% To create a row vector let us assume data of student marks obtained in 
% a particular subject

disp('marks obtained by students are')
student_marks = [ 92 95 86 80 75 89]


%  To create a column vector let us assume data of student roll number in a
%  class

disp('Roll Number')
r_n = [ 181 ; 182 ; 183 ; 184 ; 185 ; 186; 187; 188]

RESULTS : On clicking run or pressing F5 the desired row and column vector appears.

CONCLUSION : In this way we can learn that through Matlab, we can input and dsiplay large datas in form of matrix rather inputting them one by one manually.

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.