Hello,
Porting your code will require using functions with matrices.
Mul, inverse, zeros, sparse if needed, Cholesky decomposition.
The best speed up that you can will be if you can matrix multiplications run on parallel computers.
Either GPU or Multi Core CPU.
Porting to C will not be sufficient,
Now i propose to use either Intel Libraries or NVidia GPU Libraries, which ones i must see exactly what they have compared to what you need.
You will need to compile the code with Visual Studio 2017 or 2019 when it runs.
the price that i put is because, there will be a lot of testing porting the code, making sure the numbers are correct. Matlab uses double, for speed up floats can be used, but i need to see if your algorithm will be well behaved.
Usually code from CPU to GPU runs 5 times faster without big efforts, can go to 20 depending on the GPU,
But i must make sure, that Matlab does not internally uses GPU accelerator, since it has this ability.
Also i think that matlab can export C code, but i must check about this.
Hope this helps.