Please, if anyone knows please help me to debug this "Error in OFDM (line 20) info = h5gOFDMInfo(genb);"

1 次查看(过去 30 天)
I am trying to implement "HDL Code Generation for Filtered OFDM (F-OFDM) Transmitter" in this article: https://www.mathworks.com/help/wireless-hdl/ug/hdl-code-generation-for-filtered-ofdm-f-ofdm-transmitter.html
However, when calling the h5gOFDMInfo function, the mat lab reported the following error: "Undefined function 'h5gOFDMInfo' for input arguments of type 'struct'."
Does anyone know how to fix this error? Help me please. Do I need to add something to my library?

回答(2 个)

Chaitanya
Chaitanya 2023-7-11
Hi @Ho,
The error message you encountered, "Undefined function 'h5gOFDMInfo' for input arguments of type 'struct'", suggests that the function `h5gOFDMInfo` is not recognized or available in your MATLAB environment.
The `h5gOFDMInfo` function is part of the Communications Toolbox library in MATLAB, specifically introduced in MATLAB R2019b. To resolve this issue, ensure that you have the Communications Toolbox installed and that your MATLAB version is R2019b or later.
If you have confirmed that you meet the requirements and are still encountering this error, there are a few steps you can take:
1. Check the spelling and capitalization of the function name. Ensure that it matches exactly as `h5gOFDMInfo`.
2. Verify that the Communications Toolbox is correctly installed and licensed. You can do this by checking the "Add-Ons" section in the MATLAB Home tab and confirming that the Communications Toolbox is listed as installed and activated.
3. If you recently installed the Communications Toolbox or updated your MATLAB version, try restarting MATLAB to ensure that any changes are properly recognized.
Hope this helps!
  4 个评论
Ho
Ho 2023-7-11
However now Matlab has reported another error as follows: 'h5gOFDMInfo' is used in HDL Code Generation for Filtered OFDM (F-OFDM) Transmitter.
Error in OFDM (line 20)
info = h5gOFDMInfo(genb);

请先登录,再进行评论。


Bharath Venkataraman
Hi @Ho,
Could you tell us which version of MATLAB you are using?
If you open the Filtered OFDM example using openExample, the relevant helper files needed will be copied over. Please try the following command: openExample('whdl/FOFDMTransmitterExample')
Bharath

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by