You are on page 1of 4

University of bahrain

College of Information Technology


Department of Computer Engineering
ITCE417: Mobile and Wireless Networking

Introduction to MATLAB
Lab Experiment#1

Done by-Maria Shaik Haneef, 20142409


Amna Azmath, 20161934
Mariam Isa Ali, 20130835
Introduction:
MATLAB is a high-level programming language that has been used
extensively to solve complex engineering problems. The language itself
bears some similarities with ANSI C and FORTRAN. MATLAB works with
three types of windows on your computer screen. These are the Command
window, the Figure window and the Editor window. The Figure window
only pops up whenever you plot something. The Editor window is used for
writing and editing MATLAB programs (called M-files) and can be invoked
in Windows from the pull-down menu after selecting File | New | M-file. In
UNIX, the Editor window pops up when you type in the command window:
edit filename (‘filename’ is the name of the file you want to create). The
command window is the main window in which you communicate with the
MATLAB interpreter. The MATLAB interpreter displays a command >>
indicating that it is ready to accept commands from you

Report Tasks:
1. Write a MATLAB function to compute the average (mean) of a vector
x, then call and execute the function from the command window. (Do
not use the mean(x) function).
2. Plot the graph of the sine function using values of x ranging from 0 to
and label the x- and y- accesses.
Conclusion:
In this lab, we learned about commands of Arithmetic Operations, Array
Indexing, Allocating memory, Special Characters and functions, Control
flow, Operators and Plotting. For the report task, we discovered how to write
a command to find the average without using the mean command. We used
function to calculate average of vector and used the commands we learnt to
plot a sine wave.

You might also like