- 积分
- 954
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-2-6
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
大家好,我是做地球物理的,但是有段IDL程序,自己只懂C/C++、Matlab,看不懂IDL的。请大家帮个忙,将此程序翻译成matlab的,谢谢!!{:soso_e183:}
///////////////////////////////////////////////////////////////////////////////////
length=n_elements(p)
tp = 2*!dPi
pj=0 ; if jump < (>) PI then add (subract) the invariant 2PI
for c=1L,length-1 do begin
if ( abs(p(c)+pj-p(c-1)) gt !pi) then $
if ( (p(c)+pj-p(c-1)) lt 0) then pj = pj + tp $
else if ((p(c)+pj-p(c-1)) gt 0) then pj = pj - tp
p(c) = p(c) + pj
endfor
//////////////////////////////////////////////////////////////////////////////////
|
|