Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

New Articles From Microcontroller Tips

Back
Top