Build a mex file from a complicated m-file.
1 view (last 30 days)
Show older comments
Jongwoo Lee
on 24 Jul 2015
Commented: Ryan Livingston
on 29 Jul 2015
I have a heavy m-file with around 50,000 lines (~5000 kb). I need to call this function hundreds of times and each function call takes a few seconds. I tried to convert this function into a mex file to reduce computing time, but I am not quite sure whether codegen supports conversion of such a large script. Any comment is welcomed!
Jongwoo
0 Comments
Accepted Answer
Walter Roberson
on 24 Jul 2015
I wouldn't recommend that to start. Altering code properly for code generation takes a fair bit of time. It would be more productive to profile the code first, find out where the slow parts of it are and see if you can recode them, possibly including moving just the slowest parts to mex.
5 Comments
Ryan Livingston
on 29 Jul 2015
In the report, you can click on the "Build Log" tab. It should show any compiler errors if that is where the error happened.
More Answers (0)
See Also
Categories
Find more on Build Configuration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!