Matlab to C Conversion issue
1 view (last 30 days)
Show older comments
I am running a program consists of two funtions demodualtion and modulation and by using command like
output= mainfuntion.Subfuntion(input arguments) i called them into script .while running the script i am getting the output and i am able to call the funtions individually.But while Converting the Matlab to C i am facing the issue...what should i do ?
classdef AmModDemod_DSB_C_Func
methods(Static)
function [z] = AmMod_DSB_C(Ac,Am,inp,carrier,carrierhilbert)
inphasecomp=Ac*(1+(Am/Ac)*inp');
outphasecomp=0;
z=inphasecomp.*carrier-outphasecomp.*carrierhilbert;
end
function [out] = AmDemod_DSB_C(z,carrier)
a=z.*carrier;
lpFilt = designfilt('lowpassfir', 'PassbandFrequency', 0.333,...
'StopbandFrequency',0.5, 'PassbandRipple', 0.02, ...
'StopbandAttenuation', 65, 'DesignMethod', 'kaiserwin');
dataout = filter(lpFilt,a);
DCB= dsp.DCBlocker('Algorithm','FIR','Length', 100);
out=step(DCB,dataout');
end
end
end
mod=AmModDemod_DSB_C_Func.AmMod_DSB_C(Ac,Am,inp,carrier,carrierhilbert);
demod=AmModDemod_DSB_C_Func.AmDemod_DSB_C(mod,carrier);
This is type of the error i am getting ...
0 Comments
Answers (0)
See Also
Categories
Find more on Troubleshooting in MATLAB Compiler SDK in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!