0% found this document useful (0 votes)
10 views30 pages

Ders 1

The document outlines classroom rules, exam structure, and resources for learning MATLAB. It explains the functionalities of MATLAB, including its use for numerical calculations, simulations, and automation, as well as the basic operations and commands within the software. Additionally, it provides guidance on how to access help and manage variables in MATLAB.

Uploaded by

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

Ders 1

The document outlines classroom rules, exam structure, and resources for learning MATLAB. It explains the functionalities of MATLAB, including its use for numerical calculations, simulations, and automation, as well as the basic operations and commands within the software. Additionally, it provides guidance on how to access help and manage variables in MATLAB.

Uploaded by

erenkurudere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

1.

Only English
2. Come in the class on Time
3. Do not use Mobiles for any Purpose
4. Minimum Attending is %70
5. Do Ask Questions after the Lectures
1. One Mid-Term Exam (40%)
2. One Final Exam (60%)
 Holly Moore, MATLAB® for Engineers, 3rd Edition, 2012,
Pearson, New York.

 William J. Palm III. 2010. Introduction to MATLAB® for


Engineers. 3rd Edition. McGraw-Hill: New York, NY.

 Brian D. Hahn and Daniel T. Valentine. 2007. Essential


MATLAB for Engineers and Scientists. 3rd Edition.
Elsevier.

 Other resources: A number of MATLAB resources


(primers, tutorials, guides) are available on the web.
http://www.mathworks.com/
• To analyze complex systems/equations

• To simulate algorithms before real time


applications

• To interact with machines and computers

• To automate tasks

• To create intelligent machines


• Matlab stands for MATrix LABoratory
• Matlab was invented by Cleve Moler in 1970s.
• Matlab has a great number of toolboxes for
different disciplines.
• Matlab has a number of visualization tools (figures,
SimMechanics, etc.)
• Matlab and Simulink are programming and
simulation environments
• Extensively used dynamic modelling, control,
optimization, symbolic computing, etc
 Matlab is an effective tool.
 very simple numerical or statistical calculations,
 some complex statistics,
 solve simultaneous equations,
 make a graph, or run and entire simulation
program,
 Matlab can solve
 problems in applied mathematics, physics,
chemistry, engineering, finance – almost any
application area that deals with complex
numerical calculations.
 Running MATLAB
Double-click on the Matlab icon or select
Matlab from Start/Programs
 MATLAB Windows
Command Window
Workspace
Current Directory
Command History
• Matlab Help is well-written and well-organized.
• The simplest way to access Help is pull-down menu F1
› * Getting Started
• Information available about
› * How to use Matlab
› * Toolboxes
› * Matlab Functions
• Or you can use command window for help
› * >> help help
› * >> help sin
• For more information use Reference Browser
› * doc help
• Importantly use your Google search ability.
 Group of numbers arranged into rows
and columns
 Single Value (Scalar)
› Matrix with one row and one column
 Vector (One dimensional matrix)
› One row or one column
 Matrix (Two dimensional)
 You can use MATLAB like a calculator
 Try following operations please:
>> 3 + 5 + 2
>> 4*22 + 6*48 + 2*82
>>4 * 4 * 4
>>4^3
>>56/8
>>8\56
 There are some rules about the order of
operations
› Parentheses, innermost first
› Exponentiation (^), left to right
› Multiplication (*) and division (/ or \) with equal
precedence, left to right
› Addition (+) and subtraction (−) with equal
precedence, left to right

 When operators in an expression have the same


precedence the operations are carried out from
left to right. Thus 3 / 4 * 5 is evaluated as ( 3 / 4 ) * 5
and not as 3 / ( 4 * 5 ) .
 Use only ( )

 { } and [ ] mean something different

 MATLAB does not assume operators


 Variables are created dynamically in the work space
› >> a=5;
 The variable will exist until it is cleared or Matlab is
closed
› >> >> clear a
› >> a
› ??? Undefined function or variable 'a'.
 If a variable is already exist, it is overwritten
› >> a=7.8;
 Possible to see variables currently exist
› >> whos
 Semi colon is used to suppress values of the variables
› >> a=9
› a=9
 INPUT Prompt for user input.
X=input(‘enter a number’)
enter a number2
X=
2
 Enter character strings as follows
Name=input(‘enter your name :’,‘s’)
enter your name :ali
Name = ali
 Two general forms of the command disp

› disp(variable): Displays value of variable without


displaying the variable name.
› disp(string): Displays string by stripping off the single
quotes and echoing the characters between the quotes.

 String: A group of keyboard characters enclosed in single


quote marks (’). The quote marks indicate that the enclosed
characters are to represent ASCII text.

temp=78;
>> disp(temp); disp(’degrees F’)
78
degrees F
 There are several commands that can be used
to display variables with more control over the
form of the display.
 If you save a MATLAB session performed in the
command window, all that is saved are the
values of the variables you have named

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy