Using mask and creating array

7 ビュー (過去 30 日間)
Kratos
Kratos 2014 年 9 月 13 日
コメント済み: Kratos 2014 年 9 月 13 日
Hello, 1. How do I linearize Linearize variable A that should go from a MxN array to a (M*N)x1 column vector. The new (M*N)x1 vector should be calculated by going down the columns of "A".
2. How do I take the top half of the array i.e. all of the columns and the first half of the rows assuming that there are an even number of rows.
3. How do I create a mask where B is equal to 0?
Thank You.

採用された回答

Image Analyst
Image Analyst 2014 年 9 月 13 日
1. A(:)
2. A(1:(M/2), :);
3. What is B? How about B = zeros(size(A));
Did I just do your homework???
  5 件のコメント
Image Analyst
Image Analyst 2014 年 9 月 13 日
You said A is a "MxN" array. I would think you should know what M is. It's the number of rows.
Kratos
Kratos 2014 年 9 月 13 日
I got confused. Thanks :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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