MEX difficulty - inserting into an existing struct

1 visualización (últimos 30 días)
Mark
Mark el 6 de Abr. de 2013
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 =
1
1
1
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 comentario
Mark
Mark el 6 de Abr. de 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? http://www.mathworks.com/support/solutions/en/data/1-2V66G9/index.html

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by