how to collect the numerical values of marginal areas in an array????(help immediately)
조회 수: 1 (최근 30일)
이전 댓글 표시
i have matrix of (n * m) i need to collect its numerical values located at its margin(1st row, `1st column, last row and last column). em not geting how to give its size
{
for i = 1:1:n
for j= 1:1:m
----------
-----------
end
end}
it takes all rows and columns of that perticular matrix. plz make its correction.
댓글 수: 0
채택된 답변
Paulo Silva
2011년 4월 9일
m is your array
FirstRow=m(1,:);
LastRow=m(end,:);
FirstColumn=m(:,1);
LastColumn=m(:,end);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!