Matlab Matrix

  • Matrix A, B. What’s A(B)?

1. Elements of B are logical.

A =[1 2; 3 4]

1 2

3 4

B = [1 0; 1 0]

1 0

1 0

A(B) =

1 0

3 0

2. Elements of B are positive integers.

B = [1 1;2 2]

A(B) =

1 1

3 3

  • Matrix A is x dimension A(:,:,:…), how to copy A to matrix B(n,:,:,:,…)’s first dimension B(1,:,:,:…)?

d = size(A);

B = zeros([n size(A)]);

B( 1, : ) = A( : );

2 Responses

  1. I here the newcomer. Not absolutely I will understand with topic. Explain, please. http://kopitop.ru/map.html

  2. @goolloog, just try it, you’ll know.

Leave a Reply