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.

4 views (last 30 days)
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.

Accepted Answer

Akanksha
Akanksha on 23 Jun 2025
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!

More Answers (0)

Categories

Find more on MATLAB Report Generator in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!