How to execute ECG signal notch filter c code converted from matlab coder in any C/C++ code compilers?

Hi respectful coders,
I had converter ECG notch filter code from matlab to C code using matlab coder (Matlab R2022b pre-release version). When I am trying to execute in VS code it shows the following error:
cannot open source file "tmwtypes.h" (dependency of "mynotch.h")
I was trying lot to solve this error but still I could n't resolve.
Please help me with it.
Thanks.

Answers (1)

I understand that you are facing the error 'cannot open source file' while converting code from MATLAB to C.
The "cannot open source file 'tmwtypes.h'" issue you're getting means that the C code produced by MATLAB Coder depends on a header file called "tmwtypes.h," which is unique to MATLAB and contains particular data type definitions. You must make sure that your C code can access and include this header file in order to fix this problem.
You can refer to one of the MATLAB answer posts which explains how to perform the same - https://www.mathworks.com/matlabcentral/answers/286826-matlab-coder-compiler-can-t-find-tmwtypes-h.
I hope this helps resolve your issue.

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Asked:

on 4 Sep 2022

Answered:

on 10 Sep 2023

Community Treasure Hunt

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

Start Hunting!