how to collect the numerical values of marginal areas in an array????(help immediately)
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Paulo Silva
am 9 Apr. 2011
m is your array
FirstRow=m(1,:);
LastRow=m(end,:);
FirstColumn=m(:,1);
LastColumn=m(:,end);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!