フィルターのクリア

undefined variable find, used earlier in code

1 回表示 (過去 30 日間)
Adrienne
Adrienne 2014 年 5 月 18 日
回答済み: dpb 2014 年 5 月 18 日
I am trying to use a for loop to find some data and then do the total mean and SD. no_s = means number of subjects(6) TOJ = type of jump (4 different types of jump)
the error that keeps popping up is that find is an "undefined variable find". i have used find in a loop before in this code and it worked just fine can anyone help?
for S = 1:no_s;
for TOJ = 1:4
x= (find(:,1)==S);
y= (find(x,2)==TOJ);
tmeanjh(ToJ) = mean(jh(x(y)));
tsdevjh(ToJ) = std(jh(x(y)));
end
end

採用された回答

dpb
dpb 2014 年 5 月 18 日
Again, the tutorial info is "include the EXACT error message including the offending line traceback info instead of paraphrasing.
You've inadvertently created a variable find somewhere/somehow that has aliased the builtin function; execute
which find
to see what Matlab is resolving to;
clear find
to get rid of it. Both must be in the proper context, of course--if this is in a script the command workspace; if in a function will have to use debug to stop within to be in context.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by