Home - qdidactic.com
Didactica si proiecte didacticeBani si dezvoltarea cariereiStiinta  si proiecte tehniceIstorie si biografiiSanatate si medicinaDezvoltare personala
referate stiintaSa fii al doilea inseamna sa fii primul care pierde - Ayrton Senna





Aeronautica Comunicatii Drept Informatica Nutritie Sociologie
Tehnica mecanica

Matlab


Qdidactic » stiinta & tehnica » informatica » matlab
Help on-line, formatul datelor, optiuni de salvare



Help on-line, formatul datelor, optiuni de salvare


Help on-line, formatul datelor, optiuni de salvare


Help on-line


Pentru rularea MATLAB pe un PC trebuie pur si simplu executat un dublu click cu mouse-ul pe icon-ul MATLAB. Daca sistemul de operare nu este de tip Windows (este de tip UNIX) trebuie tastat matlab dupa prompter-ul sistemului de operare.


  • Limbajul MATLAB este mult mai simplu de invatat daca se renunta la inspectarea arida a listelor cu variabile, functii si operatori si se utilizeaza in schimb comenzile help, helpdesk, demo tastate direct de la prompterul MATLAB.
  • Pentru aflarea tuturor informatiilor utile despre o comanda sau o functie se tasteaza  help urmat de numele comenzii sau functiei respective.
  • Pachetul MATLAB dispune de asemenea de informatii complete despre utilizare sub forma unei documentatii tip .pdf.

o      In cazuri particulare se poate apela la INTERNET, existand o legatura la pagina Web a firmei producatoare.

  • Alte comenzi utile pentru aflarea de informatii sunt: helpwin, lookfor, help help.



Exemple sugestive de utilizare a comenzii help:


» help sin


SIN Sine.

SIN(X) is the sine of the elements of X.


Overloaded methods

help sym/sin.m


» help exp


EXP Exponential.

EXP(X) is the exponential of the elements of X, e

to the X.

For complex Z=X+i*Y, EXP(Z) =

EXP(X)*(COS(Y)+i*SIN(Y)).


See also LOG, LOG10, EXPM, EXPINT.


Overloaded methods

help sym/exp.m

help demtseries/exp.m


» help plot


PLOT Linear plot.


PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up. If X is a scalar and Y is a vector, length(Y) disconnected points are plotted.

PLOT(Y) plots the columns of Y versus their index. If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y)). In all other uses of PLOT, the imaginary part is ignored.

Various line types, plot symbols and colors may be obtained with PLOT(X,Y,S) where S is a character string made from one element from any or all the following 3 colunms:


y yellow . point - solid

m magenta o circle : dotted

c cyan x x-mark -. dashdot

r red + plus -- dashed

g green * star


b blue s square

w white d diamond

k black v triangle (down)

^ triangle (up)

< triangle (left)

> triangle (right)

p pentagram

h hexagram


For example, PLOT(X,Y,'c+:') plots a cyan dotted line with a plus at each data point; PLOT(X,Y,'bd') plots blue diamond at each data point but does not draw any line.

PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,) combines the plots defined by the (X,Y,S) triples, where the X's and Y's are vectors or matrices and the S's are strings.

For example, PLOT(X,Y,'y-',X,Y,'go') plots the data twice, with a solid yellow line interpolating green circles at the data points.

The PLOT command, if no color is specified, makes automatic use of the colors specified by the axes ColorOrder property. The default ColorOrder is listed in the table above for color systems where the default is yellow for one line, and for multiple lines, to cycle through the first six colors in the table. For monochrome systems, PLOT cycles over the axes LineStyleOrder property.

PLOT returns a column vector of handles to LINE objects, one handle per line.

The X,Y pairs, or X,Y,S triples, can be followed by parameter/value pairs to specify additional properties of the lines.

See also SEMILOGX, SEMILOGY, LOGLOG, GRID, CLF, CLC, TITLE, XLABEL, YLABEL, AXIS, AXES, HOLD, COLORDEF, LEGEND, and SUBPLOT.



Formatul datelor


MATLAB-ul afiseaza numerele cu 5 zecimale (setare implicita). Aceasta setare se poate modifica cu ajutorul comenzii format:


FORMAT Set output format.

All computations in MATLAB are done in double precision.

FORMAT may be used to switch between different output

display formats as follows:

FORMAT Default. Same as SHORT.

FORMAT SHORT Scaled fixed point format with 5 digits.

FORMAT LONG Scaled fixed point format with 15 digits.

FORMAT SHORT E Floating point format with 5 digits.

FORMAT LONG E Floating point format with 15 digits.

FORMAT SHORT G Best of fixed or floating point format with

5 digits.

FORMAT LONG G Best of fixed or floating point format with

15 digits.

FORMAT HEX Hexadecimal format.

FORMAT + The symbols +, - and blank are printed

for positive, negative and zero elements.

Imaginary parts are ignored.

FORMAT BANK Fixed format for dollars and cents.

FORMAT RAT Approximation by ratio of small integers.

Spacing:

FORMAT COMPACT Suppress extra line-feeds.

FORMAT LOOSE Puts the extra line-feeds back in.


Exemple:


» c=1.333456789233

c =

1.3335


» format long

» c

c =

1.33345678923300


» format short e

» c

c =

1.3335e+000


» format long e

» c

c =

1.333456789233000e+000


» format

» c

c =

1.3335


Optiuni de salvare


Pentru salvarea variabilelor curente cu care se lucreaza in MATLAB la incheierea unei sesiuni de lucru se poate utiliza comanda save.


Aceasta comanda va salva toate variabilele curente generate de catre utilizator intr-un fisier numit matlab.mat . Daca se doreste se poate da un nume fisierului de date in care se salveaza variabilele.


Exemplu:


» save date c determ A


realizeaza salvarea datelor c, determ si A intr-un fisier date.mat .

Pentru restituirea variabilelor intr-o sesiune de lucru ulterioara se foloseste comanda load. Exemplu:


» load date


Daca se doreste aflarea variabilelor curente se pot utiliza comenzile who,whos:


» who

Your variables are:


A         c determ


» whos

Name Size Bytes Class


A 2x2 32 double array

c 1x1 8 double array

determ 1x1 8 double array


Grand total is 6 elements using 48 bytes



Pentru stergerea tuturor variabilelor curente din memoria de lucru se poate utiliza comanda clear.




Contact |- ia legatura cu noi -| contact
Adauga document |- pune-ti documente online -| adauga-document
Termeni & conditii de utilizare |- politica de cookies si de confidentialitate -| termeni
Copyright © |- 2024 - Toate drepturile rezervate -| copyright