注册 登录
Simwe仿真论坛(forum.simwe.com),CAE/CAD/CAM/,FEA/FEM/有限元分析论坛---(手机验证注册) 返回首页

TBE_Legend的个人空间 https://home.simwe.com/?355196 [收藏] [复制] [分享] [RSS]

日志

6. how to define a periodic function in mathematica

已有 1045 次阅读2010-1-11 13:00 |

Clear[f]
f[x_] := Cos[x^Sin[4 x]] /; 0 <= x <= Pi;
f[x_] := f[x + Pi] /; x < 0;
f[x_] := f[x - Pi] /; x > Pi;
Plot[f[x], {x, - Pi, Pi}, PlotStyle -> {Blue, Thick},
  PlotRange -> All, Frame -> True] // AbsoluteTiming
Plot[f[x], {x, -10 Pi, 10 Pi}, PlotStyle -> {Blue, Thick},
  PlotRange -> All, Frame -> True] // AbsoluteTiming
 
 
 

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-3-29 16:58 , Processed in 0.024201 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

返回顶部