Effacer les filtres
Effacer les filtres

MEX difficulty - inserting into an existing struct

1 vue (au cours des 30 derniers jours)
Mark
Mark le 6 Avr 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 commentaire
Mark
Mark le 6 Avr 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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by