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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: