MATLAB程序设计与应用刘卫国(第三版)课后实验答案——7
MATLAB程序设计与应用刘卫国(第三版)课后实验答案——7
- 一
- 二
- 三
- 四
- 五
一
x=linspace(0,2*pi,101); y=(0.5+3.*sin(x)./(1+x.^2)).*cos(x); plot(x,y)
x=-5:0.01:5; y=((x+sqrt(pi))/exp(2)).*(x<=0)+(0.5.*log(x+sqrt(1+x.^2))).*(x>0); plot(x,y)
theta=0:pi/100:2*pi; a=input('输入a='); b=input('输入b='); c=input('输入c='); rho=a.*sin(b+c.*theta); polar(theta,rho,'m')
二
x=-pi:pi/100:pi; y1=x.^2; y2=cos(2*x); y3=y1.*y2; plot(x,y1,'b-',x,y2,'r',x,y3,'k--');
x=-pi:pi/100:pi; y1=x.^2; y2=cos(2*x); y3=y1.*y2; subplot(1,3,1); plot(x,y1,'b-'); title('y1=x^2'); subplot(1,3,2); plot(x,y2,'r:'); title('y2=cos(2x)'); subplot(1,3,3); plot(x,y3,'k--'); title('y3=y1*y2');
x=-pi:pi/100:pi; y1=x.^2; y2=cos(2*x); y3=y1.*y2; subplot(2,2,1); plot(x,y1,'b-',x,y2,'r:',x,y3,'k--'); subplot(2,2,2); bar(x,y1,'b');%此处条形图改为stairs;杆图为stem;填充图为fill title('y1=x^2'); subplot(2,2,3); bar(x,y2,'r'); subplot(2,2,4); bar(x,y3,'k'); title('y3=y1*y2');
三
t=0:pi/100:2*pi; x=(2+cos(t./2)).*cos(t); y=(2+cos(t./2)).*sin(t); z=sin(t./2); plot3(x,y,z,'p'); title('3D picture'); xlabel('X'),ylabel('Y'),zlabel('Z');grid;
四
x=linspace(-5,5,21); y=linspace(0,10,31); [x,y]=meshgrid(x,y); z=cos(x).*cos(y).*exp(-sqrt(x.^2+y.^2)/4); subplot(2,1,1); surf(x,y,z); title('曲面图'); subplot(2,1,2); surfc(x,y,z); title('等高线图')
五
s=0:pi/100:pi/2; t=0:pi/100:3*pi/2; [s,t]=meshgrid(s,t); x=cos(s).*cos(t); y=cos(s).*sin(t); z=sin(s); subplot(2,2,1); mesh(x,y,z); title('未着色'); subplot(2,2,2); surf(x,y,z); title('缺省'); subplot(2,2,3); surf(x,y,z); shading flat; title('shading flat'); subplot(2,2,4); surf(x,y,z); shading interp; title('shading interp');
MATLAB程序设计与应用刘卫国(第三版)课后实验答案——7相关推荐
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——12
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--12 一 二 三 四 五 一 syms n x; s1=symsum(1/(2*n-1),n,1,10) s2=symsum(n*2+x^(n ...
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——2
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--2 一 二 三 四 五 一 E=eye(3); R=rand(3,2); O=zeros(2,3); S=diag([1,2]); A=[E ...
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——3
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--3 一 二 三 四 五 六 一 A=input('请输入一个四位整数'); A=str2num(num2str(A)')'; A=A+7; A ...
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——13
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--13 一 二 三 四 五 六 一 h=figure('MenuBar','figure','color','r','WindowButtonD ...
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——8
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--8 一 二 三 四 五 一 x=rand(1,30000); mu=mean(x)%平均值 sig=std(x)%标准差 M=max(x)%最 ...
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——4
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--4 一 二 三 四 五 本节开始使用函数与脚本文件,命名规则为testx_x_x,自定义命名后命令行窗口执行时也须对应 一 function ...
- MATLAB程序设计与应用刘卫国(第三版)课后实验答案——6
MATLAB程序设计与应用刘卫国(第三版)课后实验答案--6 一 二 三 四 五 一 function[e,l,s,c]=fushu(z) %fushu 复数的指数.对数.正弦.余弦的计算 e=exp ...
- [转载] JAVA语言程序设计(基础篇)第十版课后题答案(第一章)
参考链接: Java中的Scanner和nextChar() JAVA语言程序设计(基础篇)第十版课后题答案 第一章 第二题 /** Created by ysy on 2018/7/6. */ pu ...
- 数据挖掘第三版课后题答案
写在前面 该文为数据挖掘概念与技术第三版课后习题的答案,部分参考了第二版的英文答案,由于个人水平有限,如若存在纰漏,请在评论区批评指正.另外,由于本次编辑格式较乱,可在资源下载区下载PDF版本以便参考 ...
最新文章
- tf.clip_by_value() 用法
- ShineTime - 带有 CSS3 闪亮特效的缩略图相册
- Python 技术篇-利用pyqt5库监听剪切板变动,clipboard.dataChanged.connect()剪切板监听
- Adnroid提高效率之资源文件改名
- FreeRTOS 之五 动态内存管理(heap_1.c)详解
- Eclipse快捷键(自用)
- React开发(138):ant design学习指南之anchor处理
- 【3Dtiles】3Dmax模型处理为gltf和3dtiles,包含LOD效果
- 安装了汉化包,svn却没有汉化
- element -ui如何去掉原来的蓝色下划线
- windows安装mmdetection
- MaskNet 这个CTR模型,有点意思
- PC-Lint的使用方法
- Efficient Parameter-free Clustering Using First Neighbor Relations
- FHQ Treap 详解
- 雪糕效应与互联网营销
- JAVA语言规范 JAVA SE 8 - 类型、值和变量
- 百年包豪斯 (Bauhaus) 对当今 UX 设计的启发与影响
- 一个正经的前端学习 开源 仓库(阶段十五)
- CRH和谐号动车组列车知识大全