Matlab code

Status
Not open for further replies.

Ali86

New Member
hi guys

anyone can help me to generate two codes?

first one:

128 Uniformly random numbers between -pi to +pi

======================================================
and the 2nd one

40 samples of the following signals:
(for n=-20,-19,-18,…,0,1,2,3,…,18,19)


x(n)=5δ(n-10)+2.5δ(n-20)

thanks guys
 
Uniformly random? That's not as easy as you might think, there are very few, if any random number generators that can produce a truly uniform non repeating set of random numbers.
How about writing your own code? It takes balls to throw up a post like that on a forum for your first post and expect an answer.
 
I'm sure his professor intended them to simply scale the rand() function in matlab from (-pi,pi) instead of (0,1).
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…