Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Random Numbers Help Required

Status
Not open for further replies.

mashar786

Newbie level 3
Joined
Jul 14, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
1,303
Hi

I want to create a random matrix say of size 3x3. By the help of rand command i am getting a matrix like

A=[ 1.xxxx 2.xxxx 3.xxxx ; 4.xxxx 5.xxxx and so on]

But the thing i required is the matrix of size 3x3 randomly created such that it should have all the elements from 1 to 9.

I tried round(rand(rows,columns)), but here problem i am getting is that some numbers are repeated also eg 3.2323 and 3.9494 both are rounded to 4, which i dont require. My requirement is to recieve unique whole number matrix consisting of elements 1 to m*n.
 

Mods, I request you to remove such postings....

mashar786, please refrain yourself from spamming..... there are other sections for your queries...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top