matlab绘制散点图

clc,clear

x=[11.9,11.5,14.5,15.2,15.9,16.3,14.6,12.9,15.8,14.1];

y=[196.84,196.84,197.14,197.03,197.05,197.13,197.04,196.96,196.95,196.98];

plot(x,y,'.')

Matlab将坐标系中的点连接起来

matlab绘制点线图

U
V
R=V./(U+V)
%图形展示出来
x=[1 2 3 4 5 6 7];
plot(x,U,'-.R*','LineWidth',2);
hold on;
plot(x,V,'-.G+','LineWidth',2);
hold on;
plot(x,R,'-.Mo','LineWidth',2);
%hold on;
%grid on;
xlabel('Number');
ylabel('Recognition rate (%)');

matlab:对单个矩阵plot绘图的说明

实例:a=magic(5)

a =

17    24     1     8    15
    23     5     7    14    16
     4     6    13    20    22
    10    12    19    21     3
    11    18    25     2     9

plot(a)
grid on

x=rand(10,1,40); % 随机取40个数 一个当横坐标 一个当纵坐标
y=rand(10,1,40);
%画图
plot(x( 1:10),y( 1:10),'r.');hold on; % 点 r=红色
plot(x(11:20),y(11:20),'g*');hold on; % 星星 g=绿色
plot(x(21:30),y(21:30),'o');hold on; % 圆圈 默认是蓝色
plot(x(31:40),y(31:40),'mo','MarkerSize',15) % 大大的圆圈 m=紫色

分别按行组和行列绘制三维条形图

Y = round(rand(5,3)*10);            %随机函数产生5*3的数组,对产生的数据取整

subplot(2,2,1)

bar(Y,'group')

title 'Group'

subplot(2,2,2)

bar(Y,'stack')                     %堆型二维垂直条形图

title 'Stack'

subplot(2,2,3)

barh(Y,'stack')                    %堆型二维水平条形图

title 'Stack'

subplot(2,2,4)

bar(Y,1.5)                       %设定条形的宽度为1.5

title 'Width = 1.5'

效果如图

Y = [1 2 3 4 5 6 7;

1 2 3 4 3 2 1;

76 5 4 3 2 1];

subplot(3,2,1)

bar3(Y,'detached')

title('Detached')

subplot(3,2,2)

bar3(Y,0.25,'detached')

title('Width = 0.25')

subplot(3,2,3)

bar3(Y,'grouped')

title('Grouped')

subplot(3,2,4)

bar3(Y,0.5,'grouped')

title('Width = 0.5')

subplot(3,2,5)

bar3(Y,'stacked')

title('Stacked')

subplot(3,2,6)

bar3h(Y,0.3,'stacked')

title('Width = 0.3')

效果如图

Matlab将坐标系中的点连接起来

  1. clc; clear all; close all;
  2. y=[60,58,55,53,53,53,51,50,49,46,41,41,41,40,39,40,40,40];
  3. x=[229,230,231,232,232,233,234,235,235,237,239,239,239,240,241,241,240,240];
  4. figure; hold on; box on;
  5. [x1, ind] = sort(x);
  6. y1 = y(ind);
  7. [b1, m1, n1] = unique(x1, 'first');
  8. xt = linspace(min(x), max(x));
  9. yt = interp1(x1(m1), y1(m1), xt, 'spline');
  10. plot(xt, yt, 'r-');
  11. plot(x, y, 'k*')

MATLAB绘图的更多相关文章

  1. Matlab绘图详解

    Matlab绘图 强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数.此外,M ...

  2. 使用axes函数在matlab绘图中实现图中图的绘制

    使用axes函数在matlab绘图中实现图中图的绘制 有时为了对细节进行详细说明,需要在一个较大坐标轴上绘制一个小图来对局部进行放大以阐述结果. 这可以通过调用axes函数实现. 下面通过绘制 y=1 ...

  3. matlab绘图--线性规划图解法示意

    matlab绘图--线性规划图解法示意 图解法 matlab绘图 区域填充 线性规划问题: matlab绘图 L1=[4,0;4,4];  plot(L1(:,1),L1(:,2));hold on  ...

  4. Matlab绘图(一二三维)

    Matlab绘图 强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数.此外,M ...

  5. Matlab绘图高级部分

    图形是呈现数据的一种直观方式,在用Matlab进行数据处理和计算后,我们一般都会以图形的形式将结果呈现出来.尤其在论文的撰写中,优雅的图形无疑会为文章加分.本篇文章非完全原创,我的工作就是把见到的Ma ...

  6. (转载)MatLab绘图

    转载自:http://www.cnblogs.com/hxsyl/archive/2012/10/10/2718380.html 转载自:http://www.cnblogs.com/jeromebl ...

  7. Matlab绘图系列之高级绘图

    Matlab绘图系列之高级绘图 原帖地址: http://blog.163.com/enjoy_world/blog/static/115033832007865616218/ Matlab绘图 20 ...

  8. matlab绘图(详细)(全面)

    Matlab绘图 强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数.此外,M ...

  9. Matlab 绘图完整入门

    Matlab绘图 强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数.此外,M ...

  10. 详尽全面的matlab绘图教程

    Matlab绘图 强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数.此外,M ...

随机推荐

  1. C指针-const char* p到底是什么不可以改变

    char a = 'w'; char b = 'q'; const char* p = &a; p = &b; printf("%c",p[0]); 如上一段代码, ...

  2. 浏览器IE与非IE区分

    1. window.VBArray  IE自带 if(window.VBArray) {console.log("IE 浏览器");} else{console.log(" ...

  3. mysql, count函数容易曲解的地方

    统计count(*), 数量为9行; 统计count(abandonAddTime), 数量为8; 统计count(abandonUserName), 数量为9行; count(), 不能统计null ...

  4. java基础总结——基础语法1

    一.标示符 二.关键字 三.java基本数据类型 3.1 常量 ● 常量表示不能改变的数值. ● java中常量的分类: 1. 整数常量.所有整数 2. 小数常量.所有小时 3. 布尔型常量.较为特有 ...

  5. vert.x学习(二),使用Router来定义用户访问路径

    这里需要用到vertx-web依赖了,依然是在pom.xml里面导入 <?xml version="1.0" encoding="UTF-8"?> ...

  6. Angular工作笔记

    $watch中进行深层次操作时,配合radio或者checkbox的ng-click或ng-change操作,会使checkbox失效,不知原因

  7. Cookie和Session的区别详解

    本文引用自:http://www.cnblogs.com/shiyangxt/archive/2008/10/07/1305506.html 二者的定义: 当你在浏览网站的时候,WEB 服务器会先送一 ...

  8. QMap

    #include <QCoreApplication> #include<QMap> #include<QDebug> int main(int argc, cha ...

  9. 《Linux及安全》实践3.3

    <Linux及安全>实践三 字符集总结与分析 [by lwr] 一.ISO.UCS/UTF.GB系列字符集分析 1.字符集&字符编码 字符集(Charset):是一个系统支持的所有 ...

  10. Warning: simplexml_load_string(): Entity: line 432: parser error : EntityRef: expecting ';'

    Warning: simplexml_load_string(): Entity: line 432: parser error : EntityRef: expecting ';' characte ...