All Questions
5 questions
3
votes
1
answer
174
views
Matlab vs C: Tensorproduct or Vec-trick (multiple times)
I am searching for a more efficient way to calculate the so called vec-trick used in Tensor algebra, see Wikipedia.
Introduction:
Suppose you have a matrix vector multiplication, where a matrix C ...
5
votes
1
answer
135
views
Mean of the squares of differences for a large matrix
I have tried to obtain speed gains by transferring Matlab calculations to C and call it using .mex. My goal is to operate on a matrix \$B\$ which has roughly the dimension 10000x1000
$$
\frac{1}{\...
4
votes
1
answer
924
views
Implementation of MATLAB's `im2col`
The function im2col in MATLAB is very useful to vectorize Patch based Image Processing algorithms. The problem is the function isn't optimized and doesn't use C ...
1
vote
2
answers
196
views
Using brute force to find an energy optimal path for a given amount of time
The code below implements a brute force method to find an energy optimal path for a given amount of time t_aim using recursion (the recursion function is ...
4
votes
1
answer
400
views
Is this a valid usage of structure assignment in C?
Q: Please comment on the usage of structures and structure assignment operations in C
I am working on converting a MATLAB program to C using BLAS and LAPACK for linear algebra support. The MATLAB ...