フィルターのクリア

Checking and arranging even and Odd elements in a matrix without FOR and WHILE Loops

1 回表示 (過去 30 日間)
Jalashwa
Jalashwa 2015 年 5 月 17 日
回答済み: Star Strider 2015 年 5 月 17 日
Hi Guys,
Need your help regarding an assignment question:
Write a function called division that takes a matrix A of positive integers as an input and returns two row vectors. The first one contains all the even elements of A and nothing else, while the second contains all the odd elements of A and nothing else, both arranged according to column-­‐major order of A. You are not allowed to use for-­‐loops or while-­‐loops.

回答 (1 件)

Star Strider
Star Strider 2015 年 5 月 17 日
See the documentation on Matrix Indexing.

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by