The output value of the for loop is wrong
이전 댓글 표시
Hi all,
The output structure is right but somehow the logic is wrong
please find the script below
D_Calc=[];
Filter=[];
for jj=1:12
D_Calc(:,end+1)=D(:,jj); % both D_Calc and D are same
Filter=D_Calc(D_Calc(:,jj)<PlusThreesigma(jj))
MeanFilter(:,end+1)=mean(Filter);
end
output
The filter and the mean filter value takes only the 1st column.
댓글 수: 4
Bob Thompson
2019년 6월 19일
We cannot run the code you provided, as D and PlusThreesigma re undefined.
'The filter and the mean filter value takes only the 1st column.' What does this statement mean? Are you saying that Filter and MeanFilter only give results for the first column? That they only use the first column of the input, so all the results are identical? That something with D_Calc is not correct? Please explain more. What kind of result are you seeing, and how would you expect it to be different.
rajasekar dhandapani
2019년 6월 19일
Bob Thompson
2019년 6월 19일
Ok, I was able to run your code, and I am not seeing the problem you are mentioning. For me, MeanFilter is coming out as a single row of values, with corresponding means in each column.
rajasekar dhandapani
2019년 6월 19일
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!