Tag Info

Hot answers tagged

4

With 1. notes in the answer of your latter question, 2. initial values for FQout and RQout(the values are carelessly chosen real numbers because it's bound to be overlaid), the modified code is about 40 times faster now: f = With[{dx = 1/6, n = 48, m = 300, p = 36, capacity = 2500, A = 18., B = 0.1, L = 3., RML = 30, Vf = 100, Kj = 150, w = 20, ...


1

Kind of stolen from Kuba's earlier comment: Another way to rewrite the original expression if speed is not a huge concern is via Thread Transpose as in: Transpose[{{1, 2, 3}, {4, 5, 6}}] which is especially pleasing to the eye if your initial lists are named variables (Transpose@{a, b}). On my machine this variant seems to be 10 times slower than the ...


1

Here is a solution for the second "idiom", using LibraryLink, that works only with integer packedarrays. << SymbolicC` << Developer` << CCompilerDriver` << CCodeGenerator` The definitions below are made to help abstract this function, so that we can also make it work for real/complex numbers. type = "mint"; abstractFunctionName = ...



Only top voted, non community-wiki answers of a minimum length are eligible