You are on page 1of 35

29.10.

2015
---------- IF-ELSE ----------1) Programul afiseaza un numar pozitiv/negativ sau zero
>> x = 1
x =
1
>> X =input ('x =');
x = 1
>> if x>0
fprintf('x este numar pozitiv\n')
else
fprintf ('x este numar negativ sau zero\n')
end
x este numar pozitiv
--------- IF-ELSE-IF ----------2)>> u = input ('u=');
u=2
>> v = input ('v=');
u=1
>> if u>v
frintf ('u este mai mare ca v\n')
v = input ('v=');
else if u<v
frpintf ('u este mai mic ca v\n')
end
3)>> culoare = input ('Tastati o culare:','s');
Tastati o culare:rosu
>> switch culoare
case 'rosu'
disp ('Culoarea este rosu')
case 'galben'
disp ('Culoarea este galbena')
case 'albastru'
disp ('Culoarea este albastru')
otherwise
disp ('Este alta culoare')
end
Culoarea este rosu
>>
>> culoare = input ('Tastati o culare:','s');
Tastati o culare:roz
>> switch culoare
case 'rosu'
disp ('Culoarea este rosu')
case 'galben'
disp ('Culoarea este galbena')
case 'albastru'
disp ('Culoarea este albastru')
otherwise

disp ('Este alta culoare')


end
Este alta culoare
--------for--------4)>> x=1:2:11;
>> suma = 0;
>> suma = 0; %initializam variabila "suma"
>> for i=1 : length(x)
suma = suma+x(i)
end
suma =
1
suma =
4
suma =
9
suma =
16
suma =
25
suma =
36
>> x(1)=1
x =
1

----------FOR IMBRICAT---------5)>> m = 5;
n =8;
for i=1:m %se repeta de m ori
for j = 1:n %se repeta de n ori
B(i,j)=1/(i+j-1);
end
end
>> B

11

B =
1.0000
0.5000
0.3333
0.2500
0.2000

0.5000
0.3333
0.2500
0.2000
0.1667

0.3333
0.2500
0.2000
0.1667
0.1429

0.2500
0.2000
0.1667
0.1429
0.1250

0.2000
0.1667
0.1429
0.1250
0.1111

0.1667
0.1429
0.1250
0.1111
0.1000

0.1429
0.1250
0.1111
0.1000
0.0909

0.1250
0.1111
0.1000
0.0909
0.0833

-----------END----------------11.05.2015
2)
--------------Afiseaza cod ASCII------------>> c = 'Universitatea Baia Mare'
c =
Universitatea Baia Mare
>> e = double(c)
e =
85
32

110 105 118 101 114 115 105 116


97
66
97 105
97
32
77
97 114 101

116

101

97

116

101

97

>> g = char(e)
g =
Universitatea Baia Mare
>> e = double(c) %afiseaza codul ASCII al literelor
e =
85
32

110 105 118 101 114 115 105 116


97
66
97 105
97
32
77
97 114 101

>> j = ['Forta', 'de', 'reactiune']


j =
Fortadereactiune
>> j = ['Forta ', 'de ', 'reactiune']
j =
Forta de reactiune
>> z = double(j)
z =

70
116

111 114 116


97
105 117 110 101

32

100

101

32

114

101

97

99

>> j = ['Forta', 'de', 'reactiune'] %concatenare - reuneste (grupeaza) mai multe


siruri de caractere
j =
Fortadereactiune
>> k = ['Forta ';'de ';'reactiune';] %afiseaza pe coloana
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
>> k = ['Forta ';'de ';'reactiune'] %afiseaza pe coloana
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
>> k = ['Forta '\n;'de '\n;'reactiune'] %afiseaza pe coloana
??? Undefined function or variable 'n'.
>> k = ['Forta ''de ''reactiune'] %afiseaza pe coloana
k =
Forta 'de 'reactiune
>> k = ['Forta ';'de ';'reactiune'] %afiseaza pe coloana
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
>> k = ['Forta ';'de ';'reactiune'] %afiseaza pe coloana
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
>> a = 1:3:15
a =
1

10

13

10

>> b = 1:15
b =
1
14

2
15

>> c = 14:-2:4
c =
14

12

>> x = linspace(17,58,4)
x =
17.0000

30.6667

44.3333

58.0000

10

11

12

13

>> y = linspace(pi,-pi,6)
y =
3.1416

1.8850

0.6283

-0.6283

-1.8850

-3.1416

6.9798
22.8990

8.9697
24.8889

10.9596
26.8788

12.9495
28.8687

14.9394
30.8586

16.9293
32.8485

44.7879
60.7071

46.7778
62.6970

48.7677
64.6869

50.7576
66.6768

52.7475
68.6667

80.6061
96.5253

82.5960 84.5859 86.5758 88.5657


98.5152 100.5051 102.4949 104.4848

>> w = linspace(3,200)
w =
Columns 1 through 18
3.0000
18.9192
34.8384

4.9899
20.9091
36.8283

Columns 19 through 36
38.8182
54.7374
70.6566

40.8081
56.7273
72.6465

42.7980
58.7172

Columns 37 through 54
74.6364 76.6263
90.5556 92.5455
106.4747 108.4646

78.6162
94.5354

Columns 55 through 72
110.4545 112.4444 114.4343 116.4242 118.4141 120.4040 122.3939 124.3838
126.3737 128.3636 130.3535 132.3434 134.3333 136.3232 138.3131 140.3030
142.2929 144.2828
Columns 73 through 90
146.2727 148.2626 150.2525 152.2424 154.2323 156.2222 158.2121 160.2020
162.1919 164.1818 166.1717 168.1616 170.1515 172.1414 174.1313 176.1212
178.1111 180.1010
Columns 91 through 100
182.0909 184.0808 186.0707 188.0606 190.0505 192.0404 194.0303 196.0202
198.0101 200.0000
>> t = logspace(1,2)
t =
Columns 1 through 18
10.0000
14.5635
21.2095

10.4811
15.2642
22.2300

10.9854
15.9986

11.5140
16.7683

12.0679
17.5751

12.6486
18.4207

13.2571
19.3070

13.8950
20.2359

26.8270
39.0694

28.1177
40.9492

29.4705
42.9193

30.8884
44.9843

32.3746
47.1487

Columns 19 through 36
23.2995
33.9322
49.4171

24.4205
35.5648
51.7947

25.5955
37.2759

Columns 37 through 50
54.2868
79.0604

56.8987
82.8643

59.6362
86.8511

0.8622
0.3188
-1.3077

-0.4336
0.3426
3.5784

62.5055
91.0298

65.5129 68.6649
95.4095 100.0000

71.9686

75.4312

>> randn(3)
ans =
0.5377
1.8339
-2.2588

>> D = [1 5 7 ; 3 6 8]
D =
1
3

5
6

7
8

>> randn(D)
??? Error using ==> randn
Size vector must be a row vector with real elements.
>> randn(size(D))
ans =
2.7694
-1.3499

3.0349
0.7254

-0.0631
0.7147

>> LAB(8) TABLOURI, STRUCTURI


>> help
HELP topics:
Student\Desktop
matlab\general
matlab\ops
matlab\lang
matlab\elmat
matlab\randfun
matlab\elfun
matlab\specfun
matlab\matfun
matlab\datafun
matlab\polyfun
matlab\funfun
matlab\sparfun
matlab\scribe
matlab\graph2d
matlab\graph3d
matlab\specgraph
matlab\graphics
matlab\uitools
matlab\strfun
matlab\imagesci
matlab\iofun
matlab\audiovideo

(No table of contents file)


General purpose commands.
Operators and special characters.
Programming language constructs.
Elementary matrices and matrix manipulation.
Random matrices and random streams.
Elementary math functions.
Specialized math functions.
Matrix functions - numerical linear algebra.
Data analysis and Fourier transforms.
Interpolation and polynomials.
Function functions and ODE solvers.
Sparse matrices.
Annotation and Plot Editing.
Two dimensional graphs.
Three dimensional graphs.
Specialized graphs.
Handle Graphics.
Graphical User Interface Tools.
Character strings.
Image and scientific data input/output.
File input and output.
Audio and Video support.

matlab\timefun
matlab\datatypes
matlab\verctrl
matlab\codetools
matlab\helptools
matlab\winfun
DE)
winfun\NET
matlab\demos
matlab\timeseries
matlab\hds
matlab\guide
matlab\plottools
toolbox\local
on.
matlab\datamanager
shared\instrument
coder\matlabcoder
matlabxl\matlabxl
simulink\simulink
simulink\blocks
simulink\components
simulink\fixedandfloat
fixedandfloat\obsolete
simulink\simdemos
simdemos\aerospace
mples.
simdemos\automotive
amples.
simdemos\simfeatures
simdemos\simgeneral
les.
simulink\dee
glue\studio
dastudio\depviewer
stateflow\stateflow
simulink\MPlayIO
shared\hdlshared
rtw\rtw
asap2\asap2
asap2\user
can\blocks
common\tgtcommon
targets\pil
targets\shared
toolbox\simulinkcoder
rtw\accel
blocks\library
fixedandfloat\fxpdemos
simulink\modeladvisor
stateflow\sfdemos
adivdsp\vdspdemos
adivdsp\mdlinfo
adivdsp\tfl
aero\aero
shared\mapgeodesy
aeroblks\aeroblks
aeroblks\aerodemos
aero\astdemos
AUTOSAR\AUTOSAR

Time and dates.


Data types and structures.
Version control.
Commands for creating and debugging code
Help commands.
Windows Operating System Interface Files (COM/D

Using .NET from within MATLAB


Examples and demonstrations.
Time series data visualization and exploration.
(No table of contents file)
Graphical User Interface Tools.
Graphical User Interface Tools.
General preferences and configuration informati

(No table of contents file)


(No table of contents file)
MATLAB Coder
MATLAB Builder EX
Simulink
Simulink block library.
Simulink components.
Simulink Fixed Point utilities.
(No table of contents file)
Simulink demonstrations and examples.
Simulink: Aerospace model demonstrations and sa

- Simulink: Automotive model demonstrations and s


- Simulink: Feature demonstrations and samples.
- Simulink: General model demonstrations and samp
-

Differential Equation Editor


(No table of contents file)
(No table of contents file)
Stateflow
(No table of contents file)
HDL Library
Simulink Coder
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Simulink Coder
(No table of contents file)
(No table of contents file)
Simulink Fixed Point Demos
(No table of contents file)
Stateflow demonstrations and samples.
(No table of contents file)
(No table of contents file)
(No table of contents file)
Aerospace Toolbox
Geometric Geodesy Functions
Aerospace Blockset
Aerospace Blockset demonstrations and examples.
(No table of contents file)
(No table of contents file)

bioinfo\bioinfo
bioinfo\biolearning
functions.
bioinfo\microarray
nctions.
bioinfo\mass_spec
a analysis functions.
bioinfo\proteins
s.
bioinfo\biomatrices
coring matrices.
bioinfo\biodemos
examples.
bioinfo\graphtheory
s.
blks\masks
blackfin\blackfindemos
c166\c166
c166\blocks
c166\c166demos
utils\resource_config
shared\can
can\canblks
can\canmasks
can\canmex
coder\codegendemos
coder_foundation\tfl
comm\comm
commutilities\comminit
commutilities\commmex
comm\commutilities
comm\commdemos
comm\commdeprecated
m Toolbox.
comm\examples
shared\comparisons
toolbox\compiler
control\control
control\ctrlguis
ot manipulation.
control\ctrlobsolete
control\ctrlutil
es.
control\ctrldemos
controllib\engine
engine\options
controllib\general
controllib\graphics
controllib\requirements
curvefit\curvefit
curvefit\splines
curvefit\cftoolgui
curvefit\sftoolgui
curvefit\curvefitdemos
shared\optimlib
daq\daq
daq\daqguis
t Instruments.
daq\daqdemos
os.

- Bioinformatics Toolbox
- Bioinformatics Toolbox -- Statistical Learning
- Bioinformatics Toolbox -- Microarray support fu
- Bioinformatics Toolbox -- Mass spectrometry dat
- Bioinformatics Toolbox -- Protein analysis tool
- Bioinformatics Toolbox -- Sequence similarity s
- Bioinformatics Toolbox -- Tutorials, demos and
- Bioinformatics Toolbox -- Graph Theory function
-

(No table of contents


(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
Communications System
(No table of contents
(No table of contents
(No table of contents
Communications System
Archived MATLAB Files

file)
file)
file)
file)
file)
file)
file)
file)
file)
file)
file)
file)
Toolbox
file)
file)
file)
Toolbox Demos.
from Communications Syste

Communications Toolbox Documentation Examples.


(No table of contents file)
MATLAB Compiler
Control System Toolbox
Control System Toolbox -- Visualization and pl

- Control System Toolbox -- obsolete commands.


- Control System Toolbox -- Utilities and MEX fil
-

Control System Toolbox -- Demos.


Control Library - Engine.
(No table of contents file)
Control Library - General Utilities.
Control Library - Graphics.
Control Library - Design Requirements.
Curve Fitting Toolbox
Curve Fitting Toolbox -- Spline Functions
Curve Fitting Toolbox -- Curve Fitting Tool
Curve Fitting Toolbox -- Surface Fitting Tool
Curve Fitting Toolbox -- Demos
Optimization Toolbox Library
Data Acquisition Toolbox
Data Acquisition Toolbox - Data Acquisition Sof

- Data Acquisition Toolbox - Data Acquisition Dem

shared\dastudio
database\database
database\dbdemos
database\vqb
datafeed\datafeed
datafeed\dfgui
des\desblks
des\desmasks
des\desmex
des\desdemos
toolbox\distcomp
distcomp\distcomp
distcomp\user
distcomp\mpi
distcomp\pctdemos
distcomp\parallel
parallel\util
distcomp\lang
cts.
distcomp\gpu
our computer's graphics
distcomp\worker
dotnetbuilder\dotnetbuilder
dsp\dsp
dsp\dsputilities
dsputilities\dspinit
dsputilities\dspmex
dsp\dspdemos
shared\filterdesignlib
shared\system
dspblks\dspblks
fixedpoint\fixedpoint
dsp\filterdesign
eclipseide\eclipseidedemos
eclipseide\mdlinfo
eclipseide\tfl
econ\econ
econ\econdemos
edalink\edalink
foundation\hdllink
modelsim\modelsim
ModelSim
modelsim\modelsimdemos
incisive\incisive
e
incisive\incisivedemos
discovery\discovery
ery
discovery\discoverydemos
tlmgenerator\foundation
foundation\tlmgeneratordemos
eda\fil
fil\fildemos
eda\fpgaautomation
ation
targets\ecoder
ecoder\ecoderdemos
mpt\mpt
mpt\user_specific
toolbox\embeddedcoder

(No table of contents file)


Database Toolbox
Database Toolbox Demonstration Functions.
Visual Query Builder functions.
Datafeed Toolbox
Datafeed Toolbox Graphical User Interface
SimEvents
(No table of contents file)
(No table of contents file)
SimEvents Demos.
Parallel Computing Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Parallel Algorithms
(No table of contents file)
Parallel computing programming language constru

- There are several options available for using y


-

MATLAB Distributed Computing Server


MATLAB Builder NE
DSP System Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
DSP System Toolbox demonstrations and examples.
(No table of contents file)
(No table of contents file)
(No table of contents file)
Fixed-Point Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Econometrics Toolbox
Econometrics Toolbox: Data, Demos, and Examples
EDA Simulator Link
(No table of contents file)
EDA Simulator Link for use with Mentor Graphics

- (No table of contents file)


- EDA Simulator Link for use with Cadence Incisiv
- (No table of contents file)
- EDA Simulator Link for use with Synopsys Discov
-

(No
(No
(No
(No
(No
EDA

table of contents file)


table of contents file)
table of contents file)
table of contents file)
table of contents file)
Simulator Link for Xilinx FPGA design autom

(No table of contents file)


(No table of contents file)
Module Packaging Feature
(No table of contents file)
Embedded Coder

eml\eml
toolbox\exlink
finance\finance
finance\calendar
finance\findemos
finance\finsupport
finance\ftseries
finderiv\finderiv
finderiv\finderivdemos
finfixed\finfixed
finfixed\finfixdemos
fixedpoint\fidemos
fixedpoint\fixedpointtool
shared\spcuilib
shared\siglib
toolbox\fixpoint
fpgaautomation\fpgademos
fuzzy\fuzzy
fuzzy\fuzdemos
fuzzy\fuzzyutil
geoweb\geoweb
ghsmulti\multidemos
ghsmulti\mdlinfo
ghsmulti\tfl
globaloptim\globaloptim
globaloptim\globaloptimdemos
hdlcoder\hdlcoder
hdlcoder\hdlcoderdemos
hdlfilter\hdlfilter
hdlfilter\hdlfiltdemos
iarew\iarewdemos
iarew\mdlinfo
foundation\pjtgenerator
pjtgenerator\hookpoints
pjtgenerator\tgtpref2
pjtgenerator\mdlinfo
pjtgenerator\blks
blks\masks
blks\utils
foundation\util
foundation\errorhandler
lfsocket\lfsocket
foundation\xmakefile
idelink\idelinkdemos
ident\ident
ident\nlident
"help ident" for more info.
ident\idobsolete
ident\idguis
ident\idutils
ident\iddemos
iddemos\examples
images\colorspaces
images\images
images\imdemos
mages
images\imuitools
images\iptformats
images\iptutils
shared\imageslib

(No table of contents file)


Spreadsheet Link EX
Financial Toolbox
Financial Toolbox calendar functions.
Financial Toolbox demonstration functions.
(No table of contents file)
Financial Toolbox Times Series Functions.
Financial Derivatives Toolbox
(No table of contents file)
Fixed-Income Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Simulink Fixed Point
(No table of contents file)
Fuzzy Logic Toolbox
Fuzzy Logic Toolbox Demos.
(No table of contents file)
GeoWeb Functions and Classes
(No table of contents file)
(No table of contents file)
(No table of contents file)
Global Optimization Toolbox
Global Optimization Toolbox Demos
Simulink HDL Coder
Simulink HDL Coder Demos
Filter Design HDL Coder
Filter Design HDL Coder Demos
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
System Identification Toolbox
Nonlinear System Identification features. Type

(No table of contents file)


(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Image Processing Toolbox --- colorspaces
Image Processing Toolbox
Image Processing Toolbox --- demos and sample i

Image
Image
Image
Image

Processing
Processing
Processing
Processing

Toolbox
Toolbox
Toolbox
Toolbox

--- imuitools
--- File Formats
--- utilities
Library

imaq\imaq
shared\imaqlib
imaq\imaqdemos
imaqblks\imaqblks
imaqblks\imaqmasks
imaqblks\imaqmex
instrument\instrument
instrument\instrumentdemos
instrumentblks\instrumentblks
instrumentblks\instrumentmex
instrumentblks\instrumentmasks
javabuilder\javabuilder
map\map
map\mapdemos
map\mapdisp
map\mapformats
map\mapproj
shared\maputils
slvnv\simcoverage
mpc\mpc
mpc\mpcdemos
mpc\mpcguis
mpc\mpcobsolete
MPC Toolbox
mpc\mpcutils
common\configuration
mpc555dk\mpc555demos
mpc555dk\mpc555dk
blockset\mfiles
rt\blockset
toolbox\nnet
nnet\nncontrol
.
nnet\nndemos
nndemos\nndatasets
nnet\nnadapt
nnet\nndatafun
nnet\nnderivative
nnet\nndistance
nnet\nndivision
nnet\nninitlayer
ctions.
nnet\nninitnetwork
unctions.
nnet\nninitweight
nctions.
nnet\nnlearn
nnet\nnnetfun
nnet\nnnetinput
nnet\nnnetwork
ns.
nnet\nnperformance
nnet\nnplot
nnet\nnprocess
nnet\nnsearch
nnet\nntopology
nnet\nntrain
nnet\nntransfer
nnet\nnweight
nnet\nnguis

Image Acquisition Toolbox


Image Acquisition Toolbox Library
Image Acquisition Toolbox.
(No table of contents file)
(No table of contents file)
(No table of contents file)
Instrument Control Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
MATLAB Builder JA
Mapping Toolbox
Mapping Toolbox Demos and Sample Data Sets.
(No table of contents file)
(No table of contents file)
(No table of contents file)
Map Utility Functions
Simulink Model Coverage Tool
Model Predictive Control Toolbox
(No table of contents file)
(No table of contents file)
Contents of the previous (obsolete) version of

(No table of contents file)


(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Neural Network Toolbox
Neural Network Toolbox Control System Functions

Neural
Neural
Neural
Neural
Neural
Neural
Neural
Neural

Network
Network
Network
Network
Network
Network
Network
Network

Demonstrations and Applications


Datasets
Toolbox Adapt Functions.
Toolbox Data Functions.
Toolbox Derivative Functions.
Toolbox Distance Functions.
Toolbox Division Functions.
Toolbox Layer Initialization Fun

- Neural Network Toolbox Network Initialization F


- Neural Network Toolbox Weight Initialization Fu
-

Neural
Neural
Neural
Neural

Network
Network
Network
Network

Toolbox
Toolbox
Toolbox
Toolbox

Learning Functions.
Network Functions.
Net Input Functions.
Network Creation Functio

Neural
Neural
Neural
Neural
Neural
Neural
Neural
Neural
Neural

Network
Network
Network
Network
Network
Network
Network
Network
Network

Toolbox
Toolbox
Toolbox
Toolbox
Toolbox
Toolbox
Toolbox
Toolbox
Toolbox

Performance Functions.
Plot Functions.
Processing Functions.
Line Search Functions.
Topology Functions.
Training Functions.
Transfer Functions.
Weight Functions.
GUI Functions.

nnet\nnobsolete
nnet\nnutils
optim\optim
optim\optimdemos
toolbox\pde
pde\pdedemos
phased\phased
phased\phaseddemos
data_manager\data_manager
drive\drive
drive\drivedemos
elec\elec
elec\elecdemos
foundation\foundation
mech\mech
mech\importer
mech\mechdemos
network_engine\network_engine
ne_sli\ne_sli
pm_sli\pm_sli
powersys\powersys
DR\DRdemo
drives\drivesdemo
powersys\powerdemo
sdl\sdl
sdl\classic
sh\sh
sh\shdemos
simscape\simscapedemos
foundation\simscape
library\m
simscape\m
unit_manager\unit_manager
plccoder\plccoder
plccoder\plccoderdemos
qualkits\common
qualkits\do
qualkits\iec
slvnv\reqmgt
slvnv\slvnv
slvnv\rmidemos
rf\rf
rf\rfdemos
rf\rftool
rfblks\rfblks
rfblks\rfblksmasks
rfblks\rfblksdemos
robust\robust
robust\rctlmi
robust\rctutil
robust\rctdemos
rctobsolete\lmi
mutools\commands
mutools\subs
rptgen\rptgen
rptgen\rptgenv1
rptgen\rptgendemos
rptgenext\rptgenext
rptgenext\rptgenextv1
rptgenext\rptgenextdemos

Neural Network Toolbox Obsolete Functions


Neural Network Toolbox Utility Functions
Optimization Toolbox
Demonstrations.
Partial Differential Equation Toolbox
Partial Differential Equation Toolbox Demos
Phased Array System Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
SimDriveline 1 Demos.
SimElectronics
(No table of contents file)
(No table of contents file)
SimMechanics
(No table of contents file)
SimMechanics Demos.
(No table of contents file)
(No table of contents file)
(No table of contents file)
SimPowerSystems
(No table of contents file)
(No table of contents file)
SimPowerSystems Demos
SimDriveline
(No table of contents file)
SimHydraulics
(No table of contents file)
(No table of contents file)
Simscape
(No table of contents file)
(No table of contents file)
(No table of contents file)
Simulink PLC Coder
(No table of contents file)
(No table of contents file)
DO Qualification Kit
IEC Certification Kit
Requirements Management Interface.
Simulink Verification and Validation
(No table of contents file)
RF Toolbox
RF Toolbox Demos
RF Tool Graphical User Interface
(No table of contents file)
(No table of contents file)
(No table of contents file)
Robust Control Toolbox
Robust Control Toolbox - LMI Solvers.
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Utilities for obsolete MUTOOLS commands.
MATLAB Report Generator
(No table of contents file)
(No table of contents file)
Simulink Report Generator
(No table of contents file)
(No table of contents file)

shared\rptgen
- (No table of contents file)
rtw\rtwdemos
- Simulink Coder Demos
rtwdemos\rsimdemos
- (No table of contents file)
shared\sigbldr
- (No table of contents file)
shared\slcontrollib
- Simulink Control Design Library
signal\signal
- Signal Processing Toolbox
signal\sigtools
- (No table of contents file)
signal\sptoolgui
- (No table of contents file)
signal\sigdemos
- (No table of contents file)
simbio\simbio
- SimBiology
simbio\simbiodemos
- SimBiology Demos
shared\statslib
- Statistics Toolbox Library
simrf\simrf
- SimRF
simrf\simrfdemos
- SimRF 3.0.2 Demos
sl3d\sl3d
- Simulink 3D Animation
sl3d\sl3ddemos
- Simulink 3D Animation examples.
slcontrol\slcontrol
- Simulink Control Design
slcontrol\slctrlguis
- (No table of contents file)
slcontrol\slctrlutil
- (No table of contents file)
slcontrol\slctrldemos
- (No table of contents file)
sldo\sldo
- Simulink Design Optimization
sldo\sldodemos
- Simulink Design Optimization Demos.
sldodemos\optim
- (No table of contents file)
sldodemos\estim
- (No table of contents file)
sloptim\sloptim
- (No table of contents file)
sloptim\sloptguis
- (No table of contents file)
sloptim\sloptobsolete
- (No table of contents file)
slestim\slestguis
- (No table of contents file)
slestim\slestim
- (No table of contents file)
slestim\slestmex
- Simulink Design Optimization Estimation S-Funct
ion MEX-files.
slestim\slestutil
- (No table of contents file)
sldv\sldv
- Simulink Design Verifier
sldv\sldvdemos
- (No table of contents file)
shared\sldv
- sldvisactive
- Check if Simulink Design
Verifier software is analyzing model
slvnv\simcovdemos
- (No table of contents file)
slvnv\slvnvdemos
- (No table of contents file)
shared\slvnv
- (No table of contents file)
rptgenext\slxmlcomp
- (No table of contents file)
stats\stats
- Statistics Toolbox
stats\statsdemos
- Statistics Toolbox --- Demos
stats\classreg
- (No table of contents file)
symbolic\symbolic
- Symbolic Math Toolbox
symbolic\symbolicdemos
- (No table of contents file)
systemtest\systemtest
- SystemTest
systemtest\systemtestdemos
- SystemTest demonstrations and examples.
target\targetdemos
- (No table of contents file)
foundation\utils
- (No table of contents file)
blks\mex
- (No table of contents file)
blks\masks
- (No table of contents file)
processor\tic2000
- (No table of contents file)
tic2000\utils
- (No table of contents file)
blks\masks
- (No table of contents file)
tic2000\tic2000demos
- (No table of contents file)
processor\tic6000
- (No table of contents file)
tic6000\tfl
- (No table of contents file)
tic6000\utils
- (No table of contents file)
blks\masks
- TI C6000 (tm) Blocks
tic6000\tic6000demos
- (No table of contents file)

blks\masks
blks\mex
blks\masks
blks\masks
intelhost\tfl
ti\mdlinfo
ti\utils
blks\masks
etargets\etargets
etargets\demoutils
tasking\tasking
d in a future release.
tasking\taskingdemos
testmeaslib\simulink
blks\masks
tic5000\tic5000demos
ticcs\ccsblks
ticcs\ccsdemos
ccsdemos\util
ticcs\ccslinkblks
ccslinkblks\rtdxsimblks
ticcs\lic
ticcs\mdlinfo
ticcs\tfl
ticcs\util
ticcs\envChecker
vision\vision
vision\visionutilities
visionutilities\visioninit
visionutilities\visionmex
wavelet\wavelet
wavelet\wmultisig1d
wavelet\wavedemo
wavelet\compression
extensions\wrworkbench
wrworkbench\mdlinfo
xpc\xpc
xpcblocks\thirdpartydrivers
build\xpcblocks
xpc\xpcdemos
kernel\embedded
>>
>>
>>
>>

%STRUCTURI
BD.nume = 'Nele_Timea';
BD.an = 1985;
BD.localitate = 'Sighet'

BD =
nume: 'Nele_Timea'
an: 1985
localitate: 'Sighet'
>> BD
BD =
nume: 'Nele_Timea'
an: 1985
localitate: 'Sighet'

(No table of contents


(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
(No table of contents
Support for Altium(R)

file)
file)
file)
file)
file)
file)
file)
file)
file)
file)
TASKING(R) will be remove

(No table of contents file)


(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
Computer Vision System Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
Wavelet Toolbox
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
(No table of contents file)
xPC Target
(No table of contents file)
xPC Target -- Blocks
xPC Target -- demos and sample script files.
xPC Target Embedded Option

>> ST
??? Undefined function or variable 'ST'.
>> sf
BD
BD =
nume: 'Nele_Timea'
an: 1985
localitate: 'Sighet'
>> BD
BD =
nume: 'Nele_Timea'
an: 1985
localitate: 'Sighet'
>>
>>
>>
>>

BD(2).nume= 'RusMaria';
BD(2).an = 1988;
BD(2).localitate = 'Baia Mare';
BD(2)

ans =
nume: 'RusMaria'
an: 1988
localitate: 'Baia Mare'
>> BD(3)=struct('nume','Achim','an',1989,'localitate','Viseu');
>> BD
BD =
1x3 struct array with fields:
nume
an
localitate
>> BD.localitate
ans =
Sighet
ans =
Baia Mare
ans =
Viseu
>> char(BD.nume) %afiseaza pe coloana

ans =
Nele_Timea
RusMaria
Achim
>>
-----------------------------------------------------%-- 10/22/2015 6:10 PM --%
A=[2 7 6 ; 9 0 5; 3 0.9 6];
B=[8 7 0; 3 2 5; 4 -1 7]
A==B
u=[1 0 2 3 0 5];
v=[5 6 1 0 0 7];
u&v
u|v
u~v
~u
W=[5 NaN 8 Inf]
isnan(W)
a=1
b=1
xor(a,b)
xor(a,b);
q=[0 1 2 0]
all(q)
C=[0 1 2; 3 5 0]
all(C)
t=1:10:100
i=2;
j=input('j=');
[10 13 15]
if ,i+j>10
if i+j>10
f print f('i+j=10.3f\n', i+j);
end
fprintf('i+j=10.3f\n', i+j);
end
fprint f ('i+j=10.3f\n',i+j);
f print f('i+j=%10.3f\n',i+j);
fprint f('i+j=%10.3f\n',i+j);
fprint f('i+j=10.3f\n',i+j);
clc
i=2;
j=input('j=')
[10 13 15]
fprint f('i+j=%10.3f/n',i+j)
fprint f('i+j=%10.3f\n'i+j);
end
clc
%-- 10/29/2015 4:37 PM --%
X =input ('x=');
1
if x>0
fprintf('x este numar pozitiv\n')
else
fprintf ('x este numar negativ sau zero\n')
end
x = 1

X =input ('x =');


1
if x>0
fprintf('x este numar pozitiv\n')
else
fprintf ('x este numar negativ sau zero\n')
end
x = -6
X =input ('x=');
-5
if x>0
fprintf('x este numar pozitiv\n')
else
fprintf ('x este numar negativ sau zero\n')
end
X =input ('x=');
0
if x>0
fprintf('x este numar pozitiv\n')
else
fprintf ('x este numar negativ sau zero\n')
end
u = input ('u=');
2
v = input ('u=');
1
if u>v
frintf ('u este mai mare ca v\n')
v = input ('v=');
else if u<v
frpintf ('u este mai mic ca v\n')
end
u = input ('u=');
a = input ('a=');
u = input ('u=');
%-- 10/29/2015 4:55 PM --%
u = input ('u=');
2
v = input ('v=');
1
if u>v
frintf ('u este mai mare ca v\n')
v = input ('v=');
else if u<v
frpintf ('u este mai mic ca v\n')
end
if u>v
frintf ('u este mai mare ca v\n')
%-- 10/29/2015 4:57 PM --%
culoare = input ('Tastati o culare:','s');
rosu
switch culoare
case 'rosu'
disp ('Culoarea este rosu')
case 'galben'
disp ('Culoarea este galbena')
case 'albastru'
disp ('Culoarea este albastru')
otherwise
disp ('Este alta culoare')

end
culoare = input ('Tastati o culare:','s');
roz
switch culoare
case 'rosu'
disp ('Culoarea este rosu')
case 'galben'
disp ('Culoarea este galbena')
case 'albastru'
disp ('Culoarea este albastru')
otherwise
disp ('Este alta culoare')
end
x=1:2:11;
suma = 0;
suma = 0; %initializam variabila "suma"
for i=1 : length(x)
suma = suma+x(i)
end
x(1)=1
for n=2:6
x(n)=2*x(n-1);
end
x=1
%-- 10/29/2015 5:25 PM --%
for n=2:6
x(n)=2*x(n-1);
end
x=1:2:11;
for n=2:6
x(n)=2*x(n-1);
end
m = 5;
n =8;
for i=1:m %se repeta de m ori
for j = 1:n %se repeta de n ori
B(i,j)=1/(i+j-1);
end
B
B(i,j)=1/(i+j-1)
end
%-- 10/29/2015 5:32 PM --%
m = 5;
n =8;
for i=1:m %se repeta de m ori
for j = 1:n %se repeta de n ori
B(i,j)=1/(i+j-1);
end
end
b
B
%-- 11/2/2015 8:25 AM --%
%-- 11/5/2015 5:03 PM --%
a = 1:3:15
b = 1:15
c = 'Universitatea Baia Mare'
e = double(c)
g = char(e)
e = double(c) %afiseaza codul ASCII al literelor
j = ['Forta', 'de', 'reactiune']

j = ['Forta ', 'de ', 'reactiune']


z = double(j)
j = ['Forta', 'de', 'reactiune'] %concatenare - reuneste (grupeaza) mai multe si
ruri de caractere
k = ['Forta ';'de ';'reactiune';] %afiseaza pe coloana
k = ['Forta ';'de ';'reactiune'] %afiseaza pe coloana
k = ['Forta '\n;'de '\n;'reactiune'] %afiseaza pe coloana
k = ['Forta ''de ''reactiune'] %afiseaza pe coloana
k = ['Forta ';'de ';'reactiune'] %afiseaza pe coloana
a = 1:3:15
b = 1:15
c = 14:-2:4
x = linspace(17,58,4)
y = linspace(pi,-pi,6)
w = linspace(3,200)
t = logspace(1,2)
randn(3)
D = [1 5 7 ; 3 6 8]
randn(D)
randn(size(D))
%-- 11/5/2015 5:51 PM --%
BD.nume = 'Pop Ioan';
BD.an = 1988;
BD.Universitate = 'Baia Mare';
BD
%-- 11/16/2015 8:07 AM --%
%-- 11/19/2015 4:33 PM --%
x = 0:0.002:1; %declaram vectorul
y = calcul_imprastiere(x);
plot (x,y)
p = fminsearch ('calcul_imprastiere', 0.5)
calcul_imprastiere(p)
%tablou : cu matrici zeros -elemente zero, ones-elemente 1, rand-elem, aleatoare
(0...1), randn - elem aleatoare normalizate
randn 5
randn (5)
rand (5)
%tablou : cu matrici zeros -elemente zero, ones-elemente 1, rand-elem, aleatoare
(01), randn - elem aleatoare normalizate
U = ones (3,4,5)
q=perms(1:4); %permitari de 1 luate cate 4
A=magic(4); %o apelare pt un tip de matrice care are suma tuturor elementelor de
pe linie cu suma diagonalei
M = zeros(4,4,24); %matrici de 4 linii 4 caloane si 24 de matrici pe z
for k=1:24
M(:,:,k)=A(:,q(k));
end
M
M = ones(4,4,24); %matrici de 4 linii 4 caloane si 24 de matrici pe z
for k=1:24
M(:,:,k)=A(:,q(k));
end
M
M = ones(4,4,24); %matrici de 4 linii 4 caloane si 24 de matrici pe z
for k=1:24
M(:,:,k)=A(:,q(k));
end
q=perms(1:4); %permitari de 1 luate cate 4
A=magic(4); %o apelare pt un tip de matrice care are suma tuturor elementelor de
pe linie cu suma diagonalei

M = ones(4,4,24); %matrici de 4 linii 4 caloane si 24 de matrici pe z


for k=1:24
M(:,:,k)=A(:,q(k));
end
M
q=perms(1:4);
A=magic(4);
M = ones(4,4,24);
r=perms(1:4);
B=magic(4);
N= ones(4,4,24);
for k=1:24
N(:,:,k)=A(:,r(k));
end
m
N
N=B
%sa vedem elementele matricei
size (N)
size (M)
%a 10a matrice
M(:,:,10)
%STRUCTURI
clc
help
%STRUCTURI
BD.nume = 'Nele_Timea';
BD.an = 1985;
BD.localitate = 'Sighet'
BD
ST
sf
BD
BD(2).nume= 'RusMaria';
BD(2).an = 1988;
BD(2).localitate = 'Baia Mare';
BD(2)
BD(3)=struct('nume','Achim','an',1989,'localitate','Viseu');
BD
BD.localitate
char(BD.nume) %afiseaza pe coloana
------------ 03.12.2015 --------

Tablouri tridimensionale
>> %Tablouri 3D ---- 03.12.2015 --->> %folosim matrici "ones" ex. onse(4,4), "zeros", "rand" afiseaza valori intre
[0;1] si "randn" ex.randn (4,4)
>> randn(4,4)
ans =
0.5377
1.8339
-2.2588
0.8622

0.3188
-1.3077
-0.4336
0.3426

3.5784
2.7694
-1.3499
3.0349

0.7254
-0.0631
0.7147
-0.2050

>> U=ones(3,4,5)
U(:,:,1) =
1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

U(:,:,2) =
1
1
1
U(:,:,3) =
1
1
1
U(:,:,4) =
1
1
1
U(:,:,5) =
1
1
1

>> U=ones(2,2,2)
U(:,:,1) =
1
1

1
1

U(:,:,2) =
1
1

1
1

>> U=zeros(2,2,2)
U(:,:,1) =
0
0
U(:,:,2) =

0
0

0
0

0
0

>>
>> U=ones(3,4,5)
U(:,:,1) =
1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

1
1
1

U(:,:,2) =
1
1
1
U(:,:,3) =
1
1
1
U(:,:,4) =
1
1
1
U(:,:,5) =
1
1
1
>>
-------------Permutari------------->> p = perms(1:4); %permutari 1*2*3*4=24
>> A = magic(4);
>> M = ones(4,4,24); % 24 matrici de 4linii 4 coloane
>> for k =1:24
M(:,:,k) = A(:,p(k,:));
end
>> M
M(:,:,1) =
13
8
12
1

3
10
6
15

2
11
7
14

16
5
9
4

M(:,:,2) =
13
8
12
1

3
10
6
15

16
5
9
4

2
11
7
14

3
10
6
15

16
5
9
4

16
5
9
4

3
10
6
15

2
11
7
14

3
10
6
15

3
10
6
15

2
11
7
14

2
11
7
14

16
5
9
4

16
5
9
4

2
11
7
14

13

16

M(:,:,3) =
13
8
12
1

2
11
7
14

M(:,:,4) =
13
8
12
1

2
11
7
14

M(:,:,5) =
13
8
12
1

16
5
9
4

M(:,:,6) =
13
8
12
1

16
5
9
4

M(:,:,7) =
3
10
6
15

13
8
12
1

M(:,:,8) =
3
10
6
15

13
8
12
1

M(:,:,9) =
3

10
6
15

11
7
14

8
12
1

5
9
4

16
5
9
4

13
8
12
1

2
11
7
14

13
8
12
1

13
8
12
1

2
11
7
14

13
8
12
1

16
5
9
4

16
5
9
4

13
8
12
1

3
10
6
15

16
5
9
4

16
5
9
4

3
10
6
15

M(:,:,10) =
3
10
6
15

2
11
7
14

M(:,:,11) =
3
10
6
15

16
5
9
4

M(:,:,12) =
3
10
6
15

16
5
9
4

M(:,:,13) =
2
11
7
14

3
10
6
15

M(:,:,14) =
2
11
7
14

3
10
6
15

M(:,:,15) =
2
11
7
14

13
8
12
1

M(:,:,16) =
2
11
7
14

13
8
12
1

M(:,:,17) =
2
11
7
14

16
5
9
4

13
8
12
1

3
10
6
15

3
10
6
15

13
8
12
1

2
11
7
14

13
8
12
1

13
8
12
1

2
11
7
14

3
10
6
15

13
8
12
1

13
8
12
1

3
10
6
15

2
11
7
14

3
10
6
15

M(:,:,18) =
2
11
7
14

16
5
9
4

M(:,:,19) =
16
5
9
4

3
10
6
15

M(:,:,20) =
16
5
9
4

3
10
6
15

M(:,:,21) =
16
5
9
4

2
11
7
14

M(:,:,22) =
16
5
9
4

2
11
7
14

M(:,:,23) =
16
5
9
4

13
8
12
1

M(:,:,24) =
16

13

5
9
4

8
12
1

10
6
15

>> >> M(:,:,21)

11
7
14
%apeleaza matricea 21------------------

ans =
16
5
9
4

2
11
7
14

3
10
6
15

24

13
8
12
1

size (M)
ans =
4

>> sum (M,1) %tablou 1x4x24


ans(:,:,1) =
34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

ans(:,:,2) =
34

34

ans(:,:,3) =
34

34

ans(:,:,4) =
34

34

ans(:,:,5) =
34

34

ans(:,:,6) =
34

34

ans(:,:,7) =
34

34

ans(:,:,8) =
34

34

ans(:,:,9) =
34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

34

ans(:,:,10) =
34

34

ans(:,:,11) =
34

34

ans(:,:,12) =
34

34

ans(:,:,13) =
34

34

ans(:,:,14) =
34

34

ans(:,:,15) =
34

34

ans(:,:,16) =
34

34

ans(:,:,17) =
34

34

ans(:,:,18) =
34

34

ans(:,:,19) =
34

34

ans(:,:,20) =
34

34

ans(:,:,21) =
34

34

34

34

34

34

34

34

34

34

ans(:,:,22) =
34

34

ans(:,:,23) =
34

34

ans(:,:,24) =
34

34

>> sum (M,2) % 4x1x24


ans(:,:,1) =
34
34
34
34
ans(:,:,2) =
34
34
34
34
ans(:,:,3) =
34
34
34
34
ans(:,:,4) =
34
34
34
34
ans(:,:,5) =
34
34
34

34
ans(:,:,6) =
34
34
34
34
ans(:,:,7) =
34
34
34
34
ans(:,:,8) =
34
34
34
34
ans(:,:,9) =
34
34
34
34
ans(:,:,10) =
34
34
34
34
ans(:,:,11) =
34
34
34
34
ans(:,:,12) =
34
34
34
34
ans(:,:,13) =

34
34
34
34
ans(:,:,14) =
34
34
34
34
ans(:,:,15) =
34
34
34
34
ans(:,:,16) =
34
34
34
34
ans(:,:,17) =
34
34
34
34
ans(:,:,18) =
34
34
34
34
ans(:,:,19) =
34
34
34
34
ans(:,:,20) =
34
34
34

34
ans(:,:,21) =
34
34
34
34
ans(:,:,22) =
34
34
34
34
ans(:,:,23) =
34
34
34
34
ans(:,:,24) =
34
34
34
34
>> sum (M,3) %4x4
ans =
204
204
204
204

204
204
204
204

204
204
204
204

204
204
204
204

>> f = char ('forta','este','mare')


f =
forta
este
mare
LAB 10/12/2015
>> A = [2 4 7 3; 5 1 0 4; 7 4 8 9]
A =

2
5
7

4
1
4

7
0
8

3
4
9

>> A(3,3)=A(1,3)+A(3,1)
A =
2
5
7

4
1
4

7
0
14

3
4
9

>> A(1,3)=A(1,3)+A(3,1)
A =
2
5
7

4
1
4

14
0
14

3
4
9

>> a = [2 6 4 8 3 7 1 0 6]
a =
2

>> b = a(3:7)
b =
4

>> c = a(2:2:8)
c =
6

>> c = a(2:3:8)
c =
6

>> c = a(2:4:8)

c =
6

>> c = a(2:5:8)
c =
6

>> B = A(1:3,2:4)
B =

4
1
4

14
0
14

3
4
9

>> B = A(1:2,2:4)
B =
4
1

14
0

3
4

>> C = A(:,3)
C =
14
0
14
>> D = A (1,2,:)
D =
4
>> E = [4 7 2 6; 7 3 5 6; 9 4 7 3]
E =
4
7
9

7
3
4

2
5
7

6
6
3

>> A(:, [1,3,4])=E(:,1:3)


A =
4
7
9

4
1
4

7
3
4

>> %matrice =>vector


>> F = [1 2; 3 4]
F =
1
3
>> d = A(:)

2
4

d =
4
7
9
4
1
4
7

2
5
7

3
4
2
5
7
>> d = F(:)
d =
1
3
2
4
>> %generare vector prin prin imbinarea elementelor a doi vectori
>> e = [1 3 5 7]
e =
1

>> f = [2 4 6 8]
f =
2

>> n = length (e)+length(f);


>> g(1:2:n) = e; g(2:2:n) = f;
>> g
g =
1

>> %inversarea coloanelor unei matrici


>> G = A(2,size(A,2):-1:1)
G =
5

>> G = A(:,size(A,2):-1:1)
G =
2
5
7

7
3
4

4
1
4

4
7
9

>>
>> %inversarea linilor unei matrici
>> H = A(size(A,1):-1:1,:)
H =
9
7
4

4
1
4

4
3
7

7
5
2

>>

4
7
9

4
1
4

7
3
4

2
5
7

********************************************************************************
*************************

You might also like