Matlab to C Conversion issue

2 次查看(过去 30 天)
Hari Ijjada
Hari Ijjada 2019-8-30
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 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by