Azzera filtri
Azzera filtri

How to get value in a column or row

1 visualizzazione (ultimi 30 giorni)
Tran Hoa
Tran Hoa il 30 Lug 2018
Commentato: Tran Hoa il 30 Lug 2018
Hi member, I have a matrix Ex a=[1 2 3 5 6 8], and I only want to take b= a(1), a(2) and a(4) : 1,2,5 in stead of the whole column. Can you instruct me to do it. Thank you.

Risposta accettata

KSSV
KSSV il 30 Lug 2018
a=[1 2 3 5 6 8] ;
idx = [1 2 4] ;
b = a(idx) ;

Più risposte (0)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by