Matlab to C Conversion issue

조회 수: 2 (최근 30일)
Hari Ijjada
Hari Ijjada 2019년 8월 30일
편집: madhan ravi 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