MEX difficulty - inserting into an existing struct

2 views (last 30 days)
I am experiencing difficulty in trying to MEX a function which inserts data into a struct. The logic / code works within MatLab but fails to compile.
The generated error is: ??? Subscripted assignment dimension mismatch (size [3 x 1] ~= size [3 x 2]).
Obviously they don't match, I am trying to grow the structs 'shift' this column right and insert (often used for FIFO)
A.test = [1;1;1]
A.test =
A.test = [[2;2;2] A.test]
A.test =
2 1
2 1
2 1
Is there a standard method for moving this procedure to MEX?
I've also tried cat and a temp variable in order to compile to no success.
Many thanks, Mark
  1 Comment
Mark on 6 Apr 2013
Looks like the following is relevant:
How do I concatenate two MX arrays in a MEX-file that emulates the HORZCAT command of MATLAB?

Sign in to comment.

Answers (0)


Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!