1 plot()函数

画一条线

plot(X,Y)

最基本的例子

x = 0: pi / 100:2 * pi;
y = sin(x);
figure
plot(x,y)



在一张图上画多条线

clc;
clear;
x = linspace(-2 * pi,2 * pi);
y1 = sin(x);
y2 = cos(x);
figure
plot(x,y1,x,y2)

2 Matlab绘制两个图

Matlab可以使用figure(1), figure(2)作多幅图

clc;
clear;
buoy_effective_wave = [1.45
1.43
1.41
1.42
1.382
1.364
1.39
];
radar_effective_wave = [1.44846
1.38654
1.1079
1.68066
0.9918
1.29366
1.62648
];
figure(1);
x = 0 : 6;
plot(x,buoy_effective_wave,'g--',x,radar_effective_wave,'r:');
title('有效波');
grid on;
buoy_wave_crest_week=[36.69
36.21
37.32
36.79
36.773
36.091
37.03];
radar_wave_crest_week=[35.8
33
46.5
38.7
36.6
30.2
39.5];
figure(2);
x = 0 : 6;
plot(x,buoy_wave_crest_week,'g--',x,radar_wave_crest_week,'r:');
title('波峰周');
grid on;
buoy_wave_crest=[111.268
110.972
112.153
112.484
110.495
112.951
117.189
];
radar_wave_crest=[88.48
68.35
102.16
85.16
90.62
103.49
91.32
];
figure(3);
x = 0 : 6;
plot(x,buoy_wave_crest,'g--',x,radar_wave_crest,'r:');
title('波峰峰');
grid on;

参考资料:

1 https://www.cnblogs.com/stxs/p/8617140.html

最新文章

  1. UE4 VR GUI实现 参考(UMG AND VR)
  2. php返回json数据简单实例
  3. 【Android】源码external/目录中在编译过程中生成的文件列表
  4. UVA 11551 - Experienced Endeavour(矩阵高速幂)
  5. How to use pagination in Magento
  6. 关于SYN洪泛攻击简介
  7. 复杂SQL代码实例
  8. springboot 1.5.2 thymeleaf 添加templates 静态资源访问路径
  9. C# 获取并判断操作系统版本,解决Win10、 Windows Server 2012 R2 读取失败的方案
  10. Ionic3学习笔记(十一)实现省市区三级联动
  11. jQuery操作input改变value属性值
  12. 分布式_zookeeper
  13. string find()函数
  14. Python类和实例方法和属性的动态绑定
  15. Why is it called “armature” instead of “skeleton”? or perhaps “rig”?
  16. 5.7 C++函数调用操作符重载
  17. MySQL-MMM实现MySQL高可用
  18. Android webView打不开baidu网页的解决办法
  19. bug3 乱码问题
  20. HDU 1757 A Simple Math Problem (矩阵乘法)

热门文章

  1. 使用ajax异步下载文件,后端为struts2
  2. RAC & MVVM 学习资料整理
  3. 存在不同浏览器间的JS兼容总结
  4. Sublime如何设置背景透明
  5. 永久关闭Linux的防火墙
  6. 如何查看yum安装的程序包都放在哪些地方了?
  7. lazyload懒加载插件
  8. Maven的一些常用命令
  9. python2.7+appium环境搭建
  10. spring boot 整合 RabbitMQ 错误