Pergunta

[~,col] = find(ocpRefPt(2,:)>x1 & ocpRefPt(2,:)<x2 & ocpRefPt(1,:)>y1 & ocpRefPt(1,:)<y2);

About is the line where the compilation fails. The above line is in a loop. x1,x2,x3,x4 are scalars(natural numbers) ocpRefPt is a 2x16 matrix

Error: FIND requires variable sizing

What does this mean. How to overcome this error?

Foi útil?

Solução

So it seems that you are trying to compile with emlmex to make embedded code. The error is saying that the size of the output of find is not known, and apparently the compiler requires fixed size outputs. See this newsgroup post for one explanation.

This method of compilation seems to be obsolete -- use the MATLAB coder (codegen command) instead:

emlmex Generate a C-MEX file from MATLAB code.

emlmex [-options] fun1 [fun2 ...]

This function is obsolete. For general purpose acceleration and code generation use CODEGEN.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top