MATLAB CODE TO C CODE

I tried to convert my matlab code to a code , but few functions like "fine and eign "(fourier inverse transform and eigen values) are not converting and showing some errors. Hz i could proceed? thanks

回答(1 个)

Walter Roberson
Walter Roberson 2012-1-5

0 个投票

Are you using MATLAB Coder?
When you say "fine", do you mean the numeric discrete fourier inverse transform, ifft(), or do you mean the continuous fourier inverse transform ifourier() of the Symbolic Toolbox? Nothing in the Symbolic Toolbox can be compiled.
There is no function named "eign" in MATLAB. Are you referring to the numeric full-matrix routine eig(), the numeric sparse-matrix-compatible routine eigs(), or to the Symbolic Toolbox symbolic routine eig() ?
What error messages are being shown?

4 个评论

finv- fourier inversse transform
eig - eigen value , eigen vector.
thanks
Rajeshkumar.c
finv() is not a fourier inverse transform function: finv() is part of the Stats Toolbox and it is Inverse of the F cumulative distribution function. The inverse fourier routines are, as I noted above, ifft() and ifourier()
When it says that eig is not found, does it give a more complete message? For example does it say something like eig with argument uint8 is not found? Please copy the error message.
"The function 'norminv' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation."
this is the error is showing while im using "norminv" or "eigs".
norminv() has nothing to do with fourier transforms, but anyhow.
"standalone code generation" implies that you are using MATLAB Coder rather than MATLAB Compiler; Coder has many more restrictions. Both norminv() and eigs() are supported by MATLAB Compiler, at least in current versions.
The Stats Toolbox (norminv) is not supported for MATLAB Coder, at all. http://www.mathworks.com/products/matlab-coder/description2.html
eigs is not supported for MATLAB Coder . http://www.mathworks.com/help/toolbox/eml/ug/bq1h2z7-11.html
eigs is primarily for sparse matrices, but sparse matrices are not supported for MATLAB Coder and MathWorks has not supplied an equivalent to eigs to work on full matrices.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

提问:

2012-1-5

Community Treasure Hunt

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

Start Hunting!

Translated by