资源描述:
《数学实验程序代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、实验一(*1.1函数及其图像*)Plot[Sin[x],{x,-2Pi,2Pi}];(*p按esc键pi再按esc键*)fgsin=Plot[Sin[x],{x,-2Pi,2Pi},PlotStyle®{RGBColor[0,0,1],Thickness[0.01]}(*,AspectRatio®Automatic,Axes®None*),AxesLabel®{"x","sinx"},PlotLabel->StyleForm[TraditionalForm["y=sin(x)"],FontSize®15]];ParametricPlot[{2*Cos[t],3*Sin[t]},{t,0
2、,2Pi},PlotStyle®{RGBColor[1,0,0],Thickness[0.01]},AspectRatio®Automatic];ParametricPlot[{Sin[0.99t]-0.7Cos[3.01t],Cos[1.01t]-0.1Sin[15.03t]},{t,-100,100},PlotStyle®RGBColor[0.2,0.8,0.5],PlotPoints®600000];ListPlot[{{1,2},{2,4},{3,6}}];ListPlot[{{1,2},{2,4},{3,6}},PlotStyle->{RGBColor[1,0,0],Poin
3、tSize[0.02]}];ListPlot[{1,2,3,4,5,6},PlotStyle->{RGBColor[0,0,1],PointSize[0.02]}];Plot3D[x^2-y^2,{x,-5,5},{y,-5,5},BoxRatios®{1,1,1}(*,ViewPoint®{0,-2,0}{0,0,2}{0,-2,2}{-2,-2,0}{0,-2,-2}{2,-2,0}*)];ParametricPlot3D[{2*Cos[t],2*Sin[t],0.5*t},{t,0,8Pi}];ParametricPlot3D[{u*Cos[v],u*Sin[v],u},{u,-
4、1,1},{v,0,2Pi}];ListPlot3D[{{1,1,1},{2,2,2},{3,3,3},{4,4,4},{1,2,3}},BoxRatios®{1,1,1}];<5、*1.Taylorseries*)Series[Sin[x],{x,0,10}]Series[Log[1+x],{x,0,7}]curve1=Plot[Sin[x],{x,-2Pi,2Pi},PlotStyle®{RGBColor[1,0,0],Thickness[0.01]}];curve2=Plot[x-x^3/6+x^5/120,{x,-2Pi,2Pi},PlotStyle®{RGBColor[0,1,0],Thickness[0.02]}];curve3=Plot[x-x^3/6+x^5/120-x^7/(7!),{x,-2Pi,2Pi},PlotStyle®{RGBColor
6、[0,0,1],Thickness[0.03]}];Show[curve1,curve2,curve3];Plot[{Sin[x],x-x^3/6,x-x^3/6+x^5/120,x-x^3/6+x^5/120-x^7/(7!)},{x,-2Pi,2Pi},PlotStyle®{{RGBColor[1,0,0],Thickness[0.01]},{RGBColor[0,1,0],Thickness[0.02]},{RGBColor[0,0,1],Thickness[0.03]},{RGBColor[0,0.5,1],Thickness[0.04]}}];Series[Log[1+x],
7、{x,0,7}]lgcurve1=Plot[Log[1+x],{x,-0.5,0.5},PlotStyle®{RGBColor[1,0,0]}];lgcurve2=Plot[x-x^2/2,{x,-0.5,0.5},PlotStyle®{RGBColor[0,1,0]}];lgcurve3=Plot[x-x^2/2+x^3/3-x^4/4,{x,-0.5,0.5},PlotStyle®{RGBColor[0,0,1]}];Show[lgcurv