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일

0 개 추천

1. A(:)
2. A(1:(M/2), :);
3. What is B? How about B = zeros(size(A));
Did I just do your homework???

댓글 수: 5

Kratos
Kratos 2014년 9월 13일
No you didn't. For 3 B is an array of numbers. You have to create mask where B is equal zeros. I tried but I just don't know how to use mask.
B = zeros(size(B)); % Now B is the same size but all zeros.
Kratos
Kratos 2014년 9월 13일
For number 2 what is M? Thank You.
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개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

질문:

2014년 9월 13일

댓글:

2014년 9월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by