:
1. .
2. .
3. MatLab.
4. .
meshgrid, . , ( , ).
: Î[-1; 1], yÎ[0; 1].
:
>> [x, y]= meshgrid(-1:0.05:1, 0:0.05:1);
>>z=4*sin(2*pi*x).*cos(1.5*pi*y);
, mesh, :
>> mesh (x, y, z)
, , :
hidden off , ;
hidden on ;
shading flat ;
shading interp , , .
MatLab . ,
>> p=[1 0 3.2 -5.2 0 0.5 1 -3];
, .. , , .
polyval :
>> polyval(p,1)
ans=
-2.5000
roots, . roots .
Matlab , , . ., , . , .
: x 1.
>> sin(x)^2+cos(x)^2
ans =
sym:
S = sym () - S 'sym' . , , () , ;
= sym('x') ''.
syms:
|
|
syms argl arg2... ,
argl = sym('argl'); arg2 = sym('arg2');
syms argl arg2... real syms argl arg2... unreal (real) (unreal) . .
S dif f, dif f (S, 'v') dif f (S, sym(' v')). (n=1) S v. .
diff (S, n) n- (n ) S V.
diff (S, ' v', n) diff(S,n,'v') n- S no v, .
:
>> x=sym(x); y=sym(y);
>> diff(x^y)
ans=
x^y*y/x
.
f(x) , - b - .
int(S) - S , findsym. S - , ''.
int (S, v) S v.
int (S, a, b) S b, , .
int(S,v,a,b) S v b.
:
>> x=sym(x); y=sym(y);
>> int(x^2, x)
ans=
1/3*x^3
.
() F(x) limit, :
limit (F, , ) F ;
limit (F, a) , findsym;
limit (F) =0;
limit (F, , , 'right') limit (F,x, a, 'left') .
:
>> syms a x
>> limit(sin(a*x)/(a*x))
ans=