フィルターのクリア

Code Showing "Undefined function or variable 'q'. Error in test (line 66) if(c~=q) " error Please help

1 回表示 (過去 30 日間)
IPlover
IPlover 2013 年 11 月 15 日
回答済み: Chance 2013 年 11 月 15 日
Line 65 to 70 is shown below
for r=1:1:c
if(r~=q)
w=refweight*p(r)*1/p(q);
disp(w)
end
end
Why is it showing "Undefined function or variable 'q'. Error in test (line 66) if(c~=q) " ??

回答 (1 件)

Chance
Chance 2013 年 11 月 15 日
From all that you've shown you never defined q as anything. Either variables being used must be defined and of same length (or one of them be a constant) before the logical test (~=,<=,ect) can be performed.

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by