• Matlab基本函数-cylinder函数


    1、cylinder函数:绘制三维圆柱图

    2、用法说明:

    (1)[x,y,z]=cylinder 函数返回一半径和高度都为1的圆柱体x,y,z轴的坐标值,圆柱体沿其周长有20个等距分布的点

    (2)[x,y,z]=cylinder(r) 函数一个半径为r、高度为1的圆柱体的x,y,z轴的坐标值,圆柱体沿其周长有20个等距分布的点

    (3)[x,y,z]=cylinder(r,n) 函数一个半径为r、高度为1的圆柱体的x,y,z轴的坐标值,圆柱体沿其周长有n个等距分布的点

    (4)cylinder(...) 函数只绘制圆柱,没有任何的输出参量。其他参量及结果同上

    3、实例

    3.1、[x,y,z]=cylinder 函数

    >> [x,y,x] = cylinder
    
    x =
    
      Columns 1 through 17
    
         0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
         1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1
    
      Columns 18 through 21
    
         0     0     0     0
         1     1     1     1
    
    
    y =
    
      Columns 1 through 10
    
             0    0.3090    0.5878    0.8090    0.9511    1.0000    0.9511    0.8090    0.5878    0.3090
             0    0.3090    0.5878    0.8090    0.9511    1.0000    0.9511    0.8090    0.5878    0.3090
    
      Columns 11 through 20
    
        0.0000   -0.3090   -0.5878   -0.8090   -0.9511   -1.0000   -0.9511   -0.8090   -0.5878   -0.3090
        0.0000   -0.3090   -0.5878   -0.8090   -0.9511   -1.0000   -0.9511   -0.8090   -0.5878   -0.3090
    
      Column 21
    
             0
             0
    
    
    x =
    
      Columns 1 through 17
    
         0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
         1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1
    
      Columns 18 through 21
    
         0     0     0     0
         1     1     1     1
    3.2、[x,y,z]=cylinder(r)函数

    >> [x,y,z]=cylinder(5)
    
    x =
    
      Columns 1 through 10
    
        5.0000    4.7553    4.0451    2.9389    1.5451    0.0000   -1.5451   -2.9389   -4.0451   -4.7553
        5.0000    4.7553    4.0451    2.9389    1.5451    0.0000   -1.5451   -2.9389   -4.0451   -4.7553
    
      Columns 11 through 20
    
       -5.0000   -4.7553   -4.0451   -2.9389   -1.5451   -0.0000    1.5451    2.9389    4.0451    4.7553
       -5.0000   -4.7553   -4.0451   -2.9389   -1.5451   -0.0000    1.5451    2.9389    4.0451    4.7553
    
      Column 21
    
        5.0000
        5.0000
    
    
    y =
    
      Columns 1 through 10
    
             0    1.5451    2.9389    4.0451    4.7553    5.0000    4.7553    4.0451    2.9389    1.5451
             0    1.5451    2.9389    4.0451    4.7553    5.0000    4.7553    4.0451    2.9389    1.5451
    
      Columns 11 through 20
    
        0.0000   -1.5451   -2.9389   -4.0451   -4.7553   -5.0000   -4.7553   -4.0451   -2.9389   -1.5451
        0.0000   -1.5451   -2.9389   -4.0451   -4.7553   -5.0000   -4.7553   -4.0451   -2.9389   -1.5451
    
      Column 21
    
             0
             0
    
    
    z =
    
      Columns 1 through 17
    
         0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
         1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1
    
      Columns 18 through 21
    
         0     0     0     0
         1     1     1     1>> [x,y,z]=cylinder(5)
    
    x =
    
      Columns 1 through 10
    
        5.0000    4.7553    4.0451    2.9389    1.5451    0.0000   -1.5451   -2.9389   -4.0451   -4.7553
        5.0000    4.7553    4.0451    2.9389    1.5451    0.0000   -1.5451   -2.9389   -4.0451   -4.7553
    
      Columns 11 through 20
    
       -5.0000   -4.7553   -4.0451   -2.9389   -1.5451   -0.0000    1.5451    2.9389    4.0451    4.7553
       -5.0000   -4.7553   -4.0451   -2.9389   -1.5451   -0.0000    1.5451    2.9389    4.0451    4.7553
    
      Column 21
    
        5.0000
        5.0000
    
    
    y =
    
      Columns 1 through 10
    
             0    1.5451    2.9389    4.0451    4.7553    5.0000    4.7553    4.0451    2.9389    1.5451
             0    1.5451    2.9389    4.0451    4.7553    5.0000    4.7553    4.0451    2.9389    1.5451
    
      Columns 11 through 20
    
        0.0000   -1.5451   -2.9389   -4.0451   -4.7553   -5.0000   -4.7553   -4.0451   -2.9389   -1.5451
        0.0000   -1.5451   -2.9389   -4.0451   -4.7553   -5.0000   -4.7553   -4.0451   -2.9389   -1.5451
    
      Column 21
    
             0
             0
    
    
    z =
    
      Columns 1 through 17
    
         0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
         1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1     1
    
      Columns 18 through 21
    
         0     0     0     0
         1     1     1     1
    3.3、[x,y,z]=cylinder(r,n) 函数

    >> [x,y,z]=cylinder(5,10)
    
    x =
    
      Columns 1 through 10
    
        5.0000    4.0451    1.5451   -1.5451   -4.0451   -5.0000   -4.0451   -1.5451    1.5451    4.0451
        5.0000    4.0451    1.5451   -1.5451   -4.0451   -5.0000   -4.0451   -1.5451    1.5451    4.0451
    
      Column 11
    
        5.0000
        5.0000
    
    
    y =
    
      Columns 1 through 10
    
             0    2.9389    4.7553    4.7553    2.9389    0.0000   -2.9389   -4.7553   -4.7553   -2.9389
             0    2.9389    4.7553    4.7553    2.9389    0.0000   -2.9389   -4.7553   -4.7553   -2.9389
    
      Column 11
    
             0
             0
    
    
    z =
    
         0     0     0     0     0     0     0     0     0     0     0
         1     1     1     1     1     1     1     1     1     1     1
    3.4、cylinder(...) 函数

    >> cylinder(5)
    绘制的圆柱图




  • 相关阅读:
    聊聊豆瓣阅读kindle版..顺便悼念一下library.nu…
    PhoneGap+jQm webapp本地化(1)环境搭建以及资源介绍
    尝试分析Q群作为技术群是个不恰当的选择!
    某android平板项目开发笔记计划任务备份
    android 自动化测试的傻瓜实践之旅(UI篇) 小试身手
    latex/Xelatex书籍排版总结顺便附上一本排好的6寸android书…
    某android平板项目开发笔记自定义sharepreference UI
    android ORM框架的性能简单测试(androrm vs ormlite)
    网络管理员必学手册
    PPT插入FLV视频文件的简单方法
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315618.html
Copyright © 2020-2023  润新知