of 94

• date post

14-Jan-2016
• Category

## Documents

• view

170

0

Embed Size (px)

description

### Transcript of 高等数学实验 MATLAB 实现

Matlab
3.“Open Selection” M
4.“Run Script”
7.“Show Workspace”
9. “Show GUI Layout Tool”
10. “Set Path”
Short 0.3333
Long 0.33333333333333
Hex 3fd5555555555555
Bank 0.33
(12) save name x y x y name.mat
(14) load name x y ‘name’x y
(15) diary name1.m name1.m
… diary off
MATLABMATLAB4MATLAB
1919
1.
2.
x=[2,3]y=[4,5]z1=x+y, z2=x’*y
z1 = 6 8
1.
7*x^3+8*x^2-3*x+35

A= 1 5 2
3 6 4
A=[1 5 2;3 6 4;6 8 9] 6 8 9
a1=A’ a1= 1 3 6
a2=det(A) 5 6 8
2 4 9
b=[12;6;10]
.: File/New/M-file,()edit
2. :
else y=5*x^2;
end
y
else y=1

end
2.:

c = 1 3 5 7 9
d =
0 0.6981 1.3963 2.0944 2.7925 3.4907 4.1888
Columns 8 through 10
a=
abcross (a,b) ()
a·b a×b ;
ab
b=[1 2 –1]; 2. A3=dot(-2*a,3*b)
A4=cross(a,2*b)

f = ‘ x^2+sin(x)^2-8 ’ %:
x=2*pi %
isstr(f ) %: f 1,f0
m
1 lcm
function c = lcm(a,b)
% LCM(A,B) is the least common multiple of corresponding elements of
if any(round(a(:)) ~= a(:) | round(b(:)) ~= b(:) | a(:) < 1 | b(:) < 1)
error('Input arguments must contain positive integers.');
end
r +
g *
b -
w :
k -.
Y=sin(x) x[-2,2 ] (*)

Y=x.^2; Y= sin(x);
plot(x,y) plot(x,y,’r*’)
y=ex+20 x [0,5] ()
z=2x3+3x+1 x [0,5] (*)
w=100cos(x) x [0,5] (+)

z=2*x^3+3*x+1; ylabel(‘y’)
w=100*cos(x); plot(x,y,x,z,’r*’,x,w,’m+’)
y2=2x4 x [0,2] (*)
y3=4*cos(x) x [0,2] (+)
y4=sin(x) x [0,2] (o)

f=sin(x)
1 fplot(f,[a,b])
: syms x t hold on y1=‘x^1’ ezplot(y3,[-1,1])
y2=‘x^2’ hold on
y3=‘x^3’ ezplot(y4,[-1,1])
ezplot(y1,[-1,1])
syms x
surf(x,y,z);
title('');
z=sin(r)./r;
3.: x=2*pi
limit (f,x,a)
diff(f,a) x^3
diff(f,a,2) 0
y3=(arctan(x/2))2 y’’’
y4=lncos(1/x) y(4)
z2=diff(‘(sin(x))^2*sin(x^2)’,2)
z3=diff(‘(arctan(x/2))^2’,3)
: x=05.
taylor(f,x,5)
: 1+1*x+1/2*x^2+1/6*x^3+1/24*x^4