Sie sind auf Seite 1von 128

,

: , Command Window Workspace Command History, . ,

Command Window: Workspace: : ,

Inputs ,

Commands, Outputs Workspace . .

Inputs Workspace ,

Command History: .

Start:

, ,

File ,

Edit ( Copy, Cut, Paste, Find), Clear Command Window Clear Command History Clear Workspace

Debug .

Stop If Errors/Warnings ,

, ),

Desktop: (

: 1- Docked: 2- Undocked: .

Window: Command Window .

, ,

Help: ,

( ,

) .

: "+"
3+2 5,

Workspace

, ,

3,

ans

, 3,

: (-) , 3-2=1,

( * ),

15*12= 180,

: ( / ), 12 3 4,

( ^ ),

Shift + 6

: 12^2=144,

: sqrt, 144 12

Qbasic C++ ,

, . ( % ), ,

Workspace, ans

, ,

, , , , ,

. ,

) ,

( (;)

( (;)

(i)

), Clear,

Clear

: , , , (a) & (b) Clear

(a)

, Trigonometric functions Inverse Trigonometric functions Hyperbolic Functions Inverse Hyperbolic functions Trigonometric Functions

Radian

Plotting 2D :

Hyperbolic functions

Inverse Hyperbolic Functions

(z) , Exponential Function Complex numbers and their Processes Natural Logarithm Absolute Value Approximation Processes Exponential Function

exp

Real number Numbers,

Complex Numbers Imaginary

Phase Angle,

: : ,

: angle z ,

( angle(z)

) atan2

Natural Logarithm log(x)

, Ceil

Floor

Matrices

: ,

Polynomials,

, . , : .

, Comma (,) (

, Space ) , Enter Semicolon ( ; ),

12345-

: . : A & B, m, n.

: , . 1+7=8 : , 2+8=10 ,

A&B, (+) ,

m n

[LINE]hr[/LINE]

n1

m2

[LINE]hr[/LINE]

[LINE]hr[/LINE]

, ,

X=-2 Y=3

[LINE]hr[/LINE] 12,

B,

inv X&Y

Column Vector

Row Vector

123456-

789-

10

length

120

13 12

11

120

11 12

13

1000 1

100 10

1:10 1200 10:1200 11:13 10 13 11

123 15 A(3)=15 A

2-

1Square Brackets ,

Command Window

max,

min

minimum

sum

, 12123456789101112-

Diagonal

size, length, , length ( ,

size

42

, 31 54 13 11

, ,

, ,

, , [LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] , [LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE] max [LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE]

, min [LINE]hr[/LINE]

sum

[LINE]hr[/LINE]

, diag, [LINE]hr[/LINE]

[LINE]hr[/LINE] , [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

, , ,

, magic N , . [LINE]hr[/LINE]

M-File
, 1345, , M-File , , . [LINE]hr[/LINE] , , 2, . . Debugging .

[LINE]hr[/LINE] , [LINE]hr[/LINE]

[LINE]hr[/LINE] M-File

M-File
M-File, [LINE]hr[/LINE]

[LINE]hr[/LINE] , , 1234+,-,&,*

1[LINE]hr[/LINE]

2-

[LINE]hr[/LINE] training1 [LINE]hr[/LINE]

3-

[LINE]hr[/LINE] Command Window and Workspace [LINE]hr[/LINE]

[LINE]hr[/LINE] 4M-File , [LINE]hr[/LINE]

5-

[LINE]hr[/LINE] Command Window [LINE]hr[/LINE]

, ,

[LINE]hr[/LINE] CLC .

M-File [LINE]hr[/LINE]

[LINE]hr[/LINE] CLC [LINE]hr[/LINE] Command Window

[LINE]hr[/LINE] CLC Workspace [LINE]hr[/LINE] A,B,C

[LINE]hr[/LINE] A,B,C [LINE]hr[/LINE] D,E,F Workspace

[LINE]hr[/LINE] Clear Workspace , clear, [LINE]hr[/LINE] clc .

plotting [LINE]hr[/LINE] linspace ,

[LINE]hr[/LINE]

[LINE]hr[/LINE] 15 [LINE]hr[/LINE] 5 10

[LINE]hr[/LINE] Randomization System in Matlab [LINE]hr[/LINE] randint , , [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] Input , ,

[LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE]

String and Character string character string to Character num2str str2num , string , , , input

str2num

string

character

num2str string , , , , string

2D Plotting independent independent Variable dependent Variable , dependent

plot

sine Wave

10

Sine Wave ,

Sine Wave

X-Axis , , , ,

Y-Axis

, [LINE]hr[/LINE]

[LINE]hr[/LINE] plot [LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] ( [LINE]hr[/LINE] )

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE]

grid

plot

Hold on

plot

hold off,

figure [LINE]hr[/LINE]

[LINE]hr[/LINE] plot grid [LINE]hr[/LINE] . figure figure

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE]

[LINE]hr[/LINE]

figure

close all

clear

clc clear close all

[LINE]hr[/LINE]

subplot subplot

plot subplot

1 subplot subplot

3 9

3 7

6 5 4 3 2 1

, xlabel [LINE]hr[/LINE] ylabel

X-Axis

[LINE]hr[/LINE] ylabel [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE]

title [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

text

, find [LINE]hr[/LINE]

maximum point ,

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] X [LINE]hr[/LINE] Y,

[LINE]hr[/LINE] X [LINE]hr[/LINE] Y workspace,

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

legend
, legend

[LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

[LINE]hr[/LINE] legend , , [LINE]hr[/LINE]

[LINE]hr[/LINE] [LINE]hr[/LINE]

legend

plot ,

axis,

1- 10 2- 10 3- 10 4- 10

, , , ginput , .

Enter

, , ginput,

10 .

Enter

, .

, Z X-Axis X-Axis,

X,Y&Z,

X&Y

meshgrid Y-Axis, .

Y-Axis

meshgrid meshgrid mesh plot

X-Axis , .

X&Y

EVAL
eval Sine Wave

string

Workspace

t eval,

coefficients ,

, ,

, , x=1 , y=0,z=0 x x=0, y=1, z=0 y x=0,y=0,z=1 z D . "="

Zero Crossing
, ,

, ,

, Y=0

, , ,

Digital Domain, , sine wave

Digital Domain ,

Digital Domain

, , , Digital Domain

, , ,

, , ,

y , ,

, y

trapz area area

trapz

Workspace

inputs , .

outputs

Curve Fitting
inputs Curve Fitting outputs curve fitting , , .

ones ones zeros

zeros 1

Curve Fitting 1- linear 2- Quadratic 3- Sinusoidal 4- exponential , Linear Curve Fitting ,

Linear Curve Fitting ,

Linear Curve Fitting

K&T Y X&Y

X X&Y

Row Vector

Column Vector ones

K&T

A (\)

, inv

Exponential Curve Fitting

Exponential Curve Fitting


Exponential Curve Fitting , X&Y ,

Das könnte Ihnen auch gefallen