Home » Source Code » MMSE Calculation » blind10.m

blind10.m ( File view )

  • By johnvarma 2016-06-09
  • View(s):0
  • Download(s):0
  • Point(s): 1
			clear all;
clc;
mu=0.005;
N=31;
K=2;%%%%no of users
No=0.1;
Nodb=10*log10(1/No)
%No=N*No;
no_of_bits=1000;
load 10goldcodes.mat
%novector(1:K)=No;
%sigma2Aminus2=diag(novector);
bits=round(rand(K,no_of_bits));
b=2*bits-1;

n=sqrt(No)*randn(K,no_of_bits);
x1(1,1:N)=0;
for i=1:no_of_bits
   transmitted_bits=zeros(1,N);
   for k=1:2
      transmitted_bits=b(k,i)*u(k,:)+transmitted_bits;
   end
   
   y=transmitted_bits+sqrt(No)*randn(1,N);%%received statistic
   s1=u(1,:);
   zmf=sum(y.*s1);
   z=sum(y.*(s1+x1(i,:)));
   x1(i+1,:)=x1(i,:)-mu*z*(y-zmf*s1);
   x1(i+1,:)=x1(i+1,:)-sum(s1.*x1(i+1,:))*s1;%replace by the orthogonal projection
   orth(i)=sum(s1.*x1(i+1,:));
   b_hat(i)=sign(z);
   mai=0;
   for k=2:2
      mai=mai+sum((s1+x1(i+1,:)).*u(k,:));
   end
   sir(i)=1/(No*(1+sum(x1(i+1,:)))+mai)^2;
end
b_hat=(b_hat+ones(1,no_of_bits))/2;
ber1=sum(xor(bits(1,:),b_hat(1,:)))/no_of_bits


%y=(R*A*b + n);
%%%%%%%%%%%theoretical optimum weights
%Wopt=inv(R*A*A*R+No*R)*[1;rho];

%c1=[1,1]';
%mean_squared_error(1)=sum((Wopt-c1).^2)/K;
%c1=c1-mu*(c1'*y(:,1)-b(1,1))*y(:,1);
%w1(1)=c1(1,1);
%w2(1)=c1(2,1);

%for i=2:no_of_bits
   %c1=c1-m
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
decor_det10users.m791.00 B03-12-01|04:11
blind.m1.91 kB03-12-01|04:11
blind10.m1.68 kB03-12-01|04:11
Decor_det.m764.00 B03-12-01|04:11
...
Sponsored links

blind10.m (2.77 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D