MEX difficulty - inserting into an existing struct

조회 수: 1 (최근 30일)
Mark
Mark 2013년 4월 6일
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
Mark
Mark 2013년 4월 6일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by