if i have matrix x is 4 by 5, how can I retrieve the the row number and save it into y
Mostra commenti meno recenti
Risposta accettata
Più risposte (1)
Matt Fig
il 18 Feb 2011
x = ceil(rand(4,5)*20); % An example matrix.
y = size(x,1); % Is this what you mean?
y2 = x(4,:); % Or did you mean this?
1 Commento
Hello Blower
il 18 Feb 2011
Categorie
Scopri di più su Resizing and Reshaping Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!