What does this error mean?
조회 수: 1 (최근 30일)
이전 댓글 표시
I keep getting an error saying that there is an "Unbalanced or unexpected parenthesis or bracket." This is the line I keep getting error on. What am I doing wrong?
for data(:,1:end)
댓글 수: 0
채택된 답변
Geoff Hayes
2014년 11월 9일
The problem is the code is incorrectly defined for a for loop. If the intent is to iterate through each element of data(:,1:end), then your code should be written as
numRows = size(data,1);
for k=1:numRows
% get the kth row of data
rowData = data(k,:);
% do something with the row data
end
If that is not the intent of the code, then please describe what you are trying to do.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!