Skip to content

Instantly share code, notes, and snippets.

View ha7ilm's full-sized avatar
🇭🇺

András Retzler ha7ilm

🇭🇺
  • Belgium
  • 15:48 (UTC -12:00)
View GitHub Profile
function [casadi_expr] = mupad2casadi(mupad_expr,mupad_var,casadi_var)
s = size(mupad_expr);
assert(numel(s)<=2, 'Tensors not supported. Make a vector or matrix from the mupad expression first.');
mupad_expr = mupad_expr(:);
matlabFunction(symfun(mupad_expr,mupad_var),'File','temp_fun.m');
clear temp_fun
args = vertsplit(casadi_var);
casadi_expr = temp_fun(args{:});
@masak
masak / explanation.md
Last active October 2, 2024 09:32
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.