フィルターのクリア

Error : Not enough input arguments

1 回表示 (過去 30 日間)
Manasi Dandekar
Manasi Dandekar 2021 年 5 月 28 日
コメント済み: Jan 2021 年 5 月 28 日
Hello all,
I am new to matlab , and i am getting not enough input arguments error while running one code which i got from google ,
kindly help me to resolve the error
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;

採用された回答

Jan
Jan 2021 年 5 月 28 日
How do you call this function? Do you press the green triangle in the editor? Then no inputs are provided. You have to call this from the command window or from another function as:
P = simRangeData(N,iN,S,iS)
% ^^^^^^^^^ This must be provided as inputs
  2 件のコメント
Manasi Dandekar
Manasi Dandekar 2021 年 5 月 28 日
hey Jan,
thank you so much, i provided inputs, but now its showing following error,
Unrecognized function or variable 'iN'
Jan
Jan 2021 年 5 月 28 日
I do not know, how iN is defined in your case. What is needed as 2nd input argument?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Attributes and Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by