Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- allCalcCompile = Compile[
- {{data, _Real, 2}, {dn, _Integer, 0}},
- Module[{diff, x2, y2, x2m, y2m, x2s, y2s, disp, std},
- diff = (Differences[data, 1, dn]^2);
- {x2, y2} = Transpose@diff;
- {{x2m, x2s}, {y2m,
- y2s}} = {Mean[#], StandardDeviation[#]} & /@ {x2, y2};
- std = StandardDeviation[x2 + y2];
- disp = x2m + y2m;
- {disp, std, x2m, x2s, y2m, y2s}];
- , RuntimeOptions -> "Speed"
- ];
- {t, newCompile} =
- AbsoluteTiming[
- Transpose@
- Table[allCalcCompile[data, dn], {dn, 1, Length@data - 2}]];
- Transpose::nmtx: The first two levels of {Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,<<2674>>} cannot be transposed. >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement