当前位置: 首页 > 程序语言 >求助matlab画出螺旋线的程序

求助matlab画出螺旋线的程序

作者 lzbbc
来源: 小木虫 300 6 举报帖子
+关注

用matlab编一个程序,使plot(x,y)出来是这个图形
必须是等间距的
谢谢大家
 返回小木虫查看更多

今日热帖
  • 精华评论
  • 锐利的碎片

    CODE:
    import matplotlib.pyplot as plt
    import numpy as np
    fig=plt.figure()
    ax=fig.add_subplot(111,polar=True)
    r=np.arange(0,1,0.001)
    theta=5*2*np.pi*r
    ax.plot(theta,r)
    plt.show()

  • libralibra

    阿基米德螺线

    CODE:
    v = 1; % line velocity
    w = 1; % Angular velocity
    t = 1:.1:100; % time
    t = -t; % control direction
    x = v.*t.*cos(w*t); % x coordinates
    y = v.*t.*sin(w*t); % y coordinates
    plot(x,y); % plot figure
    axis equal % make figure squre


  • lzbbc

    引用回帖:
    Originally posted by libralibra at 2011-06-12 16:47:54:
    阿基米德螺线

    [code]v = 1; % line velocity
    w = 1; % Angular velocity
    t = 1:.1:100; % time
    t = -t; % control direction
    x = v.*t.*cos(w*t); % x coordinates
    y = v.*t.*sin(w*t); % y coordinates
    ...

    请问下,如果想把这个螺旋曲线的圈数定为10,怎么改啊?谢谢啊!

  • libralibra

    引用回帖:
    Originally posted by lzbbc at 2011-06-12 20:01:53:
    请问下,如果想把这个螺旋曲线的圈数定为10,怎么改啊?谢谢啊!

    w角速度,t时间
    你计算下w*t多久是10*2π

  • lzbbc

    引用回帖:
    Originally posted by libralibra at 2011-06-12 22:54:13:
    w角速度,t时间
    你计算下w*t多久是10*2π

    能帮我改下程序吗?万分感谢!能不能跟我QQ上聊?昨天留信息在你QQ上的!谢谢啦!

  • weiqiangjing

    引用回帖:
    3楼: Originally posted by libralibra at 2011-06-12 16:47:54
    阿基米德螺线

    v = 1; % line velocity
    w = 1; % Angular velocity
    t = 1:.1:100; % time
    t = -t; % control direction
    x = v.*t.*cos(w*t); % x coordinates
    y = v.*t.*sin(w*t); % y coordinates
    plot(x, ...

    请问怎么在此图的基础上再按照每10米画点?

猜你喜欢
下载小木虫APP
与700万科研达人随时交流
  • 二维码
  • IOS
  • 安卓