-4

i have assignment that i have to print a pure sine wave & add some noise to it & print another copy, i know that i can get pure sine wave using matlab/simulink but how can i add noise to it? is there away to implement it using simulink part of matlab or i have to use the commands, i donnt know too much about commands in matlab so i implemented it using simulink also the output of the pure sine wave block doesn't appear like pure sine wave so what's the problem? thanks. enter image description here

Amr saad
  • 13
  • 1
  • 7
  • Your question ("What's the problem?") is too general and it does not seem like you've put much effort into helping yourself. Your issues could easily be solved by going through a basic MATLAB tutorial. Additionally, this is a site for programming questions but you seem to want to avoid any actual programming and just use the simulink gui. – Doug Lipinski Mar 30 '14 at 20:50
  • yes i prefer simulink work, cuz i'm familiar with simulink which is not the case with matlab command – Amr saad Mar 30 '14 at 21:04
  • To help you out a bit more, the "problem" above is that your resolution is quite low. I'm not familiar with simulink, but you adjust the number of points and do what you need very easily with the MATLAB commands `linspace`, `sin`, `awgn`, and `plot`. I'd suggest reading the documentation and examples for those. MATLAB's documentation is very good and should be plenty to get you going. – Doug Lipinski Mar 30 '14 at 22:12

2 Answers2

0

You can add white noise to any waveform by using the built in function awgn.

QEx
  • 81
  • 1
  • 10
0

both awgn and wgn functions work. but you'd better know what SNR is needed.