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 Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by