What are the steps to reproduce the plots in 5G New Radio Polar Coding example?
3 次查看(过去 30 天)
显示 更早的评论
The plot presented as an example for 5G New Radio Polar Coding in the following link:
states that the results were produced by encapsulating the code presented in that page into a function that supports C-code generation.
I would like to know what were the intermediary steps that were used. Is it that C-code was generated and it is called in MATLAB or the code was run in C and saved data is used in MATLAB to plot it?
In my work as well I most often do simulations to produce BER plots, I would like to adopt similar methodology, so that I can speed up the executions. It would be helpful if someone puts in steps that can recreate the plots in that example using C-code generation.
0 个评论
采纳的回答
Konstantinos Athanasiou
2022-10-19
A fitting workflow to speed up the execution time of this example (and produce similar plots quickly) could be:
1. Encapsulate the code into a function for code generation by puting the script's code in a function, say:
function bler = computeBLER
% the script's code here
bler = numferr/numFrames;
end
2. Use MATLAB coder and its codegen function (https://www.mathworks.com/help/coder/generating-code.html) to generate the MEX function computeBLER_mex
>> codegen computeBLER
3. Call computeBLER_mex from other matlab scripts/function to gather the results and plot them as needed.
2 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!