what is the problem of this function code?
이전 댓글 표시
function sectionGrades = extractSection(grades, sectionNumber)
for i = 1 : 7
if grades(i,2) ~= sectionNumber
grades(i,:) = [];
else
end
end
sectionGrades = grades;
end
it keeps saying Error in extractSection (line 6) if grades(i,2) == sectionNumber
what is wrong with this?
I saved this file as extractSection.m
and 'grades' is a matrix that i downloaded.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!