You are on page 1of 6

‫جامعة دمياط‬

‫كلية الهندسة‬

‫تكليف بحثي‬
‫مقدم من‬
‫وفاء ايمن محمد نظيم الجزار)مستجد تقدير)‬ ‫اسم الطالب‬
‫‪1000033666‬‬ ‫كود الطالب‬
‫‪975‬‬ ‫رقم الجلوس‬
‫القوى الميكانيكية‬ ‫الشعبة‬
‫الفرقة‪ /‬المستوي االولى‬
‫اسم المقرر وكوده )‪ (MEC213‬تطبيقات الحاسب (‪)1‬‬
‫د‪ /‬مروة فايز فهمى‬ ‫أستاذ المقرر‬

‫الجزء خاص بأعمال بالكنترول‬

‫تاريخ االمتحان‬
‫تاريخ التسليم‬
‫‪1-‬‬ ‫أسماء السادة المصححون‬
‫‪2-‬‬
‫‪3-‬‬
‫رئيس الكنترول‬

‫راسب‬ ‫ناجح‬
‫التقييم‬
‫‪INTRODUCTION‬‬
Matlab is a strong mathematical software program designed to manage
science and engineering calculations. It allows users to enter variables and control
its kind, import and export data, make mathematical operations, create files to use
in matlab and to draw geometries of functions.

Matlab can be used as a calculation and make difficult operations that hard to
solve. It also deal with any number as a matrix and helps us to solve it, it is
difficult operation to do by our minds so it save time and effort. And there is very
important property that it helps you to specify the wrong code easily not as other
programs.

For example :It can help us to make a program that take a picture for the license
plate of a car and find its number and transfer it to Data Base and determine the
entry and exit times for the car.

THE BODY

The window of matlab is consists of 4 panels:

1. The current window which the folders and files of the projects are shown
there.
2. Command window: the commands are written there, preceded by (>>).
3. Workspace: show all variables in the project.
4. Command history: we can show or return commands.

We put (;) to indicate that the statement is ended and (%) to add a comment. The

signs of mathematical operation (+, - , *, /) is used in any equation but in arrays


we use (. +, . - , . *, . /) for the operations.

1
Variables are very important in matlab and there are conditions for naming them,
they can only contain letters, numbers and ( _ ) .

“Who” command is used to show you the variables names that used in the
project. “Whos” command shows things more than who (name, bytes, size and
class of the variable). “Clear” command deletes all variables in the memory and
can delete one variable by writing its name after clear.

We can write commands of the project in some files and connect them with (.m
extension).

Vector is a one dimensional array of numbers, they are two types of vectors
row vector and column vector. We can do operations on them with another
vector or scalar quantity.

Matrix is a two dimensional array of numbers. To create row of the matrix


we should put comma or space between elements and semicolon to end the row
and start another one. There are some command to facilitates making matrixes
such as the command “one” that make a matrix all its elements is one and we can
write after one command and “eye” make matrix with 1 in the main diagonal and
can control the numbers of rows and column.

Example

2
“Size” command is used to tell us the size of the matrix, its rows and columns
number.

This command used to delete a row or column


“Det” is used to determine the determinate of the matrix.

There are some command to input and output text to user:

“Input commands” like showing icon and make a space to write something in it.

“Output commands” like

Msgbox

f = msgbox (message)

f = msgbox (message, title)

f = msgbox (message, title, icon)

Questdlg is used to write a question and put chooses to it

In matlab we can compare a matrix with another or compare with scalar and
if the result is true the program print 1 and 0 if it is false.

3
It also allows us to repeat the conditions multiple times until reach your target that
is called looping. “Continue” statement
finish the current step and return to the top
of the loop. “Nested loop” enable us to use
a loop inside another loop.

We can draw a graph of a function in


matlab by

1. Specifying the range of X


2. Finding the function Y=f (x)
3. Calling the plot command as plot
(X, Y)

Cousin geometry

THE SPECIAL PART

No doubt that all the commands that studied in this course, is important and
have important applications. I think the part of the output input commands have a
lot of benefits, so I will show how some of these commands is performed.

1-Input box
Used to take a
text from user

2- Output (dialog box)


Used to give a message to
users

4
3- Output (dialog box)
Used to warn that
something wrong

4-Output (dialog box)

To ask a question and


give chooses

REFERENCES

Introduction to Matlab with Applications by Dr /Marwa Fayez Fahmy

 http://www.mathworks.com/products/availability/index.html#ML 

You might also like