Monday, November 30, 2009

Code beauty, J vs. Mathematica

I drew the equivalent kernel of a smoothing spline in J.



Code:
t =: i: 10 j. 1000
y=:(%2) * (^-|t% (%2)) * sin(( (|t)* (%:2) % 2 )+ (pi%4))
plot t;y


This is the Mathematica version:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.