文档介绍:...wd...
...wd...
=
x = 3
y = -
x = 5
y =
x =
y =
7、某地区1-12月份的平均气温为5,8,13,20,25,28,31,33,27,24,19,10,请绘图表示。
过程:: T=[5,8,13,20,25,28,31,33,27,24,19,10];
bar(T)
结果:
...wd...
...wd...
...wd...
第2次实验任务
某大学本科生就业情况如下:458人考入研究生,60人签到外企或合资企业,184人签到国营大企业,87人签到私人企业,13人自主创业,画出饼图表示之;
过程:x=[458 60 184 87 13];
pie3(x)
答案:
求极限
过程:syms x a;
limit('((x-a)/(x+a))^x',x,inf)
答案:ans=exp(-2*a)
求极限
过程:>> syms x;
>> limit('tan(x)^(1/log10(x))',x,0,'right')
答案:ans=exp〔1〕
过程:syms x q t;
q =limit('(1+1/x)^(2*x)',x,inf);
df=diff('q^t',t)
答案:df =q^t*log(q)
;
过程:syms a b;
F=(a+b)^3+(b-1)^2+a+2*b;
expand(F)
答案: ans =a^3+3*a^2*b+3*a*b^2+b^3+b^2+1+a
过程:syms x;
F=x^5+3*x^4+2*x^2+x-1;
factor(F)
答案:ans= x^5+3*x^4+2*x^2+x-1
过程:syms x;
C=solve(‘x^3-2*x+1=0’)
答案C=
1
1/2*5^(1/2)-1/2
...wd...
...wd...
...wd...
-1/2-1/2*5^(1/2)
8.
过程:>> syms x;
>> f=sqrt(x+sqrt(x+sqrt(x)));
>> df=diff(f)
答案:df= 1/2/(x+(x+x^(1/2))^(1/2))^(1/2)*(1+1/2/(x+x^(1/2))^(1/2)*(1+1/2/x^(1/2)))
9. 求不定积分
过程: syms x;
F=1/(sqrt(2*x+3)+sqrt(2*x-1));
Nf=int(F,x,)
答案:Nf =-1/12*(2*x-1)^(3/2)+1/12*(2*x+3)^(3/2)
过程: syms x;
F=1/(1+cos(x));
Nf=int(F)
答案:Nf =tan(1/2*x)
10 求定积分
过程:syms x;
F=1/(x*sqrt(log(x)*(1-log(x)));
Nf=int(F,x,exp(1/2),exp(3/4))
答案:ans=
asin(2*log(595882530372511)-96*log(2)-1)-asin(2*log(1856295125090727)-100*log(2)-1)
11. 解方程组
过程:syms x y;
eq1=sym(‘2*x+y=8’);
eq2=sym(‘x-3*y=1’);
[x,y]=solve(eq1,eq2)
答案:x =25/7
y =6/7
12. 求和
过程:syms k;
symsum(1/k