daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Apr 17th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function y = send( signal, odds )
  2.  
  3. sygnal_length = length(signal);
  4. tmp = size(sygnal_length,1);    
  5. tmp = rand(sygnal_length,1);              
  6.                                
  7.  
  8. for i = 1:sygnal_length             %petla o dlugosci syganlu
  9.     if tmp(i) < odds          %porownuje kazdy element wektora tmp z szansa
  10.         signal(i) = ~signal(i);     %w przypadku spelnienia warunku neguje bit
  11.     end
  12. end
  13.  
  14. y = signal;                         %zwraca zmieniony juz sygnal
  15.  
  16. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top