I am running code in MATLAB for soft demodulation, and I am using the file SisoDecode.c and SisoDecode.dll, but the program reports an error. I need a solution.

1 次查看(过去 30 天)
I am running code in MATLAB for soft demodulation, and I am using the file SisoDecode.c and SisoDecode.dll, but the program reports an error. I need a solution.

采纳的回答

Akanksha
Akanksha 2025-6-23
The error you've reported : Undefined function or variable 'SisoDecode'. usually means MATLAB can't find the SisoDecode function.Most likely, it's written in a C file (SisoDecode.c) and needs to be compiled into a MEX file (like SisoDecode.dll on Windows) before MATLAB can use it.
Kindly try the following steps to fix it:
1. Compile the MEX file
Make sure SisoDecode.c is compiled. In MATLAB, just run:
mexSisoDecode.c
Depending on yourOS, this will create: SisoDecode.mexw64 (for Windows), SisoDecode.mexa64(for Linux) or SisoDecode.mexmaci64(for macOS)
2. Add the MEX file to your MATLAB path
Make sure the compiled file is either in your current folder or added to MATLAB’s path. You can do that with:
addpath('path_to_mex_file_directory');
3. Check for any compilation issues
If the mex command fails, it could be due to:
  • Missing libraries or dependencies
  • Code that’s not compatible with your MATLAB version
  • No compiler set up (you can run mex -setup to configure one)
4. Double-check the function definition
Make sure the SisoDecode function is properly defined in the .c file and that the way you're calling it in sim_sccc.m matches its input/output format.
Here are the official MathWorks documentation pages that you can refer for further queries :
Hope this helps!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Report Generator 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by