24小时热门版块排行榜    

CyRhmU.jpeg
查看: 2613  |  回复: 6

lzbbc

木虫 (正式写手)

流体数值模拟

[求助] 求助matlab画出螺旋线的程序

用matlab编一个程序,使plot(x,y)出来是这个图形
必须是等间距的
谢谢大家
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

潜心学习!!!
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

锐利的碎片

木虫 (正式写手)

star watcher

【答案】应助回帖


xzhdty(金币+1): 谢谢应助 2011-06-12 17:33:29
lzbbc(金币+5): 谢谢 2011-06-13 14:01:43
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()

2楼2011-06-12 16:24:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

libralibra

至尊木虫 (著名写手)

骠骑将军

【答案】应助回帖


xzhdty(金币+1): 谢谢应助 2011-06-12 17:33:48
lzbbc(金币+5): 谢谢 2011-06-13 14:01:52
阿基米德螺线
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

matlab/VB/python/c++/Java写程序请发QQ邮件:790404545@qq.com
3楼2011-06-12 16:47:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

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,怎么改啊?谢谢啊!
潜心学习!!!
4楼2011-06-12 20:01:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

libralibra

至尊木虫 (著名写手)

骠骑将军

【答案】应助回帖


jjdg(金币+1): 感谢参与 2011-06-13 00:33:27
引用回帖:
Originally posted by lzbbc at 2011-06-12 20:01:53:
请问下,如果想把这个螺旋曲线的圈数定为10,怎么改啊?谢谢啊!

w角速度,t时间
你计算下w*t多久是10*2π
matlab/VB/python/c++/Java写程序请发QQ邮件:790404545@qq.com
5楼2011-06-12 22:54:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lzbbc

木虫 (正式写手)

流体数值模拟

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

能帮我改下程序吗?万分感谢!能不能跟我QQ上聊?昨天留信息在你QQ上的!谢谢啦!
潜心学习!!!
6楼2011-06-13 10:07:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

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米画点?
7楼2014-11-21 16:44:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 lzbbc 的主题更新
信息提示
请填处理意见