Filter löschen
Filter löschen

Even Numbers in a matrix a

12 Ansichten (letzte 30 Tage)
Nicholas Cappellino
Nicholas Cappellino am 31 Okt. 2018
Kommentiert: Jonas Campos am 27 Mai 2021
I have a matrix 1 through 20 and i need to make a new matrix b with even numbers 1 through 20

Antworten (1)

madhan ravi
madhan ravi am 31 Okt. 2018
Bearbeitet: madhan ravi am 31 Okt. 2018
a=1:20
b=a(rem(a,2)==0)
  5 Kommentare
madhan ravi
madhan ravi am 31 Okt. 2018
If you got the answer to your question make sure to accept the answer so people know question is solved else let know
Jonas Campos
Jonas Campos am 27 Mai 2021
This answer works

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB 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!

Translated by