充.4
1. MATLAB..5
1.1. . .5
1.2. - 8
1.3. ⅅ12
1.4. 腅13
1.5. . .14
1.6. ...15
1.7. 充...16
셅18
1.9. 酅...21
1.10. ..21
2.
MATLAB ..23
2.1. ...23
2.2. 腅29
2.3. ...35
2.4. ..43
2.5. ..51
3.
MATLAB57
3.1. ...57
3.2. - ..61
3.3. ..67
. , , MATLAB.
c MATLAB. , . .
, MATLAB, . - .
1. MATLAB
.
(.1.1.). , (Commnd Window).
. 1.1. . .
>> . . . Enter . (. . 1.1.)
( ) Page Up, Page Down.
|
|
↑ ↓ ( ). ↑ , . ↓ ( ) .
( ) , .
. .
; . , ; Enter . (. . 1.1)
, , , Workspace. (. . 1.1)
.mat Command Window .
.1.1.
. strcat, .1.1.
(. .1.1) Desktop ( ). , Desktop Layout :
Default , Command Window, Workspace, Command History, Current Directory.
Command Window Only Command Window.
History and Command Window .
All Tabbet , - , .
, - ( .m), () , ( ) . (..1.2).
-, . .1.3.
( , 6.4713e+003) ( 81.5000).
% (..1.2).
. , , y=sin(x); y=atan(x); y=exp(x); y=log(x) , y=log10(x) , y=fix(x) , y=floor(x) , y=ceil(x) , y=round(x)
: _ = _-_: __-_: _-_; (. .1.2).
y=x_mas(2); () (. .1.2).
|
|
-
FileNew--M-file Editor -. , , - Command Window. DebugRun .
. 1.2. .
. 1.3. -
FileSave -.
. 1.4. -
( - , ). (..1.4.)
- - FileOpen .
%. (..1.3).
Function y=f(x)
%
%, , % %
y=(x+2).*(x-4); % * ..*
% ; %
end
-:
str=P I Pupkin
.
:
xleft=input(' ');
:
disp(' , ');
disp(string);
[n1, n2, , n10]=funName(v1, v2, , v4)
( ). - .
( ).
- function
function [x,y,xleft1,xright1,nn]=ZolS1()
. .
- ( )
[x,y,xleft1,xright1,nn]=ZolS1();
%
h=0.1;
x1=xleft:h:xright; %
y1=f(x1); %
plot(x1,y1,k-);
grid on; %
title('y=(x+2)(x-4)'); %
xlabel('X'); %
ylabel('Y');
text(x,y,\leftarrow Minimum);% Minimum ,
% x,y.
zeroMas=x1*0;
hold on; %
plot(masx,masy,r.); %
legend(plot with minimal step,plot with your step,0);
hold on;
plot(x1,zeroMas,k-,zeroMas,y1,k-); %
.1.5.
plot(x,y) Figure 1 ( ) .
plot(x1,y1,'k-');
k- .
r. .
hold on .
. 1.5.
|
|
(. . 1.6)
%
masx=xleft:hx:xright;
masy=yleft:hy:yright;
masz=fz_xy2(masx,masy);
%
mesh(masx,masy,masz); %
grid on;
title(z=-sqrt(256-x.^2-y.^2));
xlabel(X);
ylabel(Y);
zlabel(Z);
text(x,y,z,\leftarrow Minimum);
legend(z(i,j)=-sqrt(256-x(i)*x(i)-y(j)*y(j)),0);
mesh(masx,masy,masz); .
. 1.6.
.
. ( , .
A=[1 2 3; 5 67 89; 34 21 5];
B=[3 4 5; 54 32 12; 6 7 8];
33 ).
A_transp=A; .
C_res_mult=A*B; C_res_mult .
_obr=A^(-1);
: A_obr=inv(A);
C=A+B;
D=det(A);
, , b , :
x=linsolve(A,b);