f



Matrix, matlab

Hello,

a)I need to create an M*M matrix of all zeros, except for one row on
ones in the center.

M in the matrix will vary from 16, 32,64,128.

b)I need to repeat the above for two rows of ones.Here the two rows
of ones should be seperated by four rows of zeros.

Thank you,
0
suetibu (129)
10/5/2004 1:45:22 PM
comp.soft-sys.matlab 211266 articles. 19 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
373 Views

Similar Articles

[PageSpeed] 57


athina shah wrote:
> Hello,
> 
> a)I need to create an M*M matrix of all zeros, except for one row on
> ones in the center.
> 
> M in the matrix will vary from 16, 32,64,128.

it will be pretty difficult, since you can not create the rows number 
7.5, 15.5 and so one

> b)I need to repeat the above for two rows of ones.Here the two rows
> of ones should be seperated by four rows of zeros.

is this your homework?

Look at help zeros, help ones and Matlab tutorial.

Waldemar

0
10/5/2004 1:58:47 PM
Reply: