Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
adjecent

Subject: adjecent

From: amit sharma

Date: 4 Jun, 2010 16:56:05

Message: 1 of 3

Dear sir

I want to make a adjacent symmetric matrix(10x10), which each row and
column have five 1's random place.

Waiting for your kind response

thanks

Subject: adjecent

From: Roger Stafford

Date: 5 Jun, 2010 02:39:04

Message: 2 of 3

amit sharma <sharma.a28@gmail.com> wrote in message <f5874816-0954-45ed-9792-95990b58621f@42g2000prb.googlegroups.com>...
> I want to make a adjacent symmetric matrix(10x10), which each row and
> column have five 1's random place.

  Hmm! Where have I seen that question before?

 n = 10;
 A = (1+(-1).^(0:n-1))/2;
 A = toeplitz(A,A);
 p = randperm(n);
 A = A(p,p)

Roger Stafford

Subject: adjecent

From: amit sharma

Date: 5 Jun, 2010 16:28:54

Message: 3 of 3

On Jun 5, 6:39 am, "Roger Stafford"
<ellieandrogerxy...@mindspring.com.invalid> wrote:
> amitsharma<sharma....@gmail.com> wrote in message <f5874816-0954-45ed-9792-95990b586...@42g2000prb.googlegroups.com>...
> > I want to make a adjacent symmetric matrix(10x10), which each row and
> > column have five 1's random place.
>
>   Hmm!  Where have I seen that question before?
>
>  n = 10;
>  A = (1+(-1).^(0:n-1))/2;
>  A = toeplitz(A,A);
>  p = randperm(n);
>  A = A(p,p)
>
> Roger Stafford

thanks sir

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us