Documente Academic
Documente Profesional
Documente Cultură
-----------------------------------------------------------------------------------
--------------------------------------------------------------
clear all / clear :-it will clear the data base
clc :-screen will be cleaned
clear f :- f will be cleared
e :- power of 10 (ex= 1e3)
exp( ) :- exponational power (e^3)
.* :- element wise *
.\ :- element wise \
'text' :- string
-----------------------------------------------------------------------------------
-----------------
ones(rows,column) :- to have a matrix with 1 as all element
zeros(rows,column) or zeros(size) :-sama with 0
eye(size) :- identity matrix
magic(size) :- to have a matrix where adding in any line it's summation
is same
unique(A) :- only show you the number ones in the matrix
setdiff(a,b) :- only show the diff bet 2 matrix
/ :- for div
\ :- inverse
========================================================
======================================================================
format short :- it will show only 4 digits after decimal
31.4162
format short e :- it will show only 4 digits after decimal with e
3.1415e+01
format long :- it will show only 15 digits after decimal
31.415....... (15 digits)
format long e :- it will show only 15 digits after decimal
3.1415....... e+1(15 digits)
format bank :- it will show only 2 digits after decimal
31.42
format compact :- gap between the line is less
format loose :- gap in between the lines will be more
function use
--------------------
function [name of the outputs ] = name_ofthe_function
(variables_used_for_calculation1) //this all are done in side the function coding
[variables those are return from the function ]= name_ofthe_function
(variables_used_for_calculation2)