convert specific vector to vector in one direction
Ältere Kommentare anzeigen
if i have av=[1 2;3 4;2 1;4 3] and i want the result a=[1 2;3 4]
Antworten (3)
James Tursa
am 19 Feb. 2016
Bearbeitet: James Tursa
am 19 Feb. 2016
a = av(1:2,1:2);
If this simple solution is not what you are looking for then please give more details in your question.
Based on your reply it looks like you simply want the top half of your matrix. So try this:
[m n] = size(av);
a = av(1:(m/2),:);
muhammad ismat
am 19 Feb. 2016
0 Stimmen
muhammad ismat
am 19 Feb. 2016
0 Stimmen
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!