unrecognized function or variable

Hi Everyone,
i have the error "Unrecognized function or variable 'iN',
I don't know how to fix this problem. Thank you in advance for your help
code:
function [P]=simRangeData(N,iN,S,iS)
pwrSig=10.^(S/10);
pwrNoise=10.^(N/10);
nRangeGate=iN(end);
voltNoise_I=zeros(nRangeGate,1);
voltNoise_Q=zeros(nRangeGate,1);
I=length(iN);
iLead=1;
for i=1:I
iLag=iN(i);
voltNoise_I(iLead:iLag)=sqrt(pwrNoise(i)/2)*randn(iLag-iLead+1,1);
voltNoise_Q(iLead:iLag)=sqrt(pwrNoise(i)/2)*randn(iLag-iLead+1,1);
iLead=iLag;
end
noise=voltNoise_I+j*voltNoise_Q;
signal=zeros(size(noise));
I=length(iS);
for i=1:I
pwrSwerling=exprnd(pwrSig(i),1,1);
signal(iS(i))=sqrt(pwrSwerling/2)+j*sqrt(pwrSwerling/2);
end
data=signal+noise;
P=abs(data).^2;

2 Kommentare

Adam Danz
Adam Danz am 28 Mai 2021
Always provide the entire error message and tell us how you're calling your function.
Mahesh Taparia
Mahesh Taparia am 31 Mai 2021
Hi
As stated by Adam, do provide the complete function and the code where you are calling this function.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 28 Mai 2021

Kommentiert:

am 31 Mai 2021

Community Treasure Hunt

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

Start Hunting!

Translated by