フィルターのクリア

MATLAB expression 'Mf' is not of the correct sparseness...

4 ビュー (過去 30 日間)
Christoforos Rekatsinas
Christoforos Rekatsinas 2014 年 10 月 28 日
Hello Im trying to transform a function to a .mex function through the command "coder". One of my inputs is a sparse double matrix. when the coder asks to define the type of the variable 'Mf' I setit as a double(:inf x :inf). it builts it and when it comes to run the function it stops with the following message: "MATLAB expression 'Mf' is not of the correct sparseness"
I would appreciate any suggestions and solutions. Thank you!

採用された回答

Ryan Livingston
Ryan Livingston 2014 年 10 月 28 日
I'll give the same answer as on StackOverflow:
MATLAB Coder does not currently support sparse matrices.
Depending upon the size of the data, you may consider converting the inputs to full matrices before calling your MEX function.
If the purpose of generating a MEX function is to speed up parts of your code, you could consider generating MEX functions for the functions in your code which do not require sparse and call those from your other MATLAB code. This way, you could accelerate parts of the code and still use sparse where required.
  1 件のコメント
Christoforos Rekatsinas
Christoforos Rekatsinas 2014 年 10 月 28 日
Thx m8. I did realize it my self also!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by