亚星游戏官网-yaxin222

门户 | 手机客户端 | 论坛 | 人才 | 百科 | 搜索 | 技术问答 | English
待解决问题
请各位大神帮我看下毕设怎么做,来点思路也行阿~~~~~~~~
离问题结束还有0天0小时  |  提问者:通信女屌丝   |  提问时间:2013-5-24 11:30
本科毕业女屌丝,运营商工作都签了却卡死在毕设上。毕设老师太残忍了,女屌丝下周三要交初稿但是连代码都没搞出来特别捉急!!!我的毕设课题是——室外覆盖的无线局域网吞吐量仿真和网络规划,主要是在matlab的现有的wlan仿真平台上修改原有的802.11N的信道模型来适应802.11ac的信道,来实现仿真。老师给了前期的802.11N的代码,周一才答应给AC模型的代码,要求必须看懂AC信道模型如何添加和修改,拜托大家帮忙看下!


% --- Executes during object creation, after setting all properties.
function edit39_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit39 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor))
set(hObject,BackgroundColor,white);
end


% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
%此函数功能是:在点击链路预算界面退出按钮时实现的功能
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if strcmp(get(handles.uipanel2,visible),on)
set(handles.uipanel2,visible, off);
pause(0.01);
set(handles.text12,visible, on);
set(handles.axes1,visible, on);
set(handles.save_all_images_button,visible, on);
set(handles.pushbutton2,enable,on);
set(handles.pushbutton5,enable,on);

end



% --- Executes on selection change in popupmenu7.
function popupmenu7_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,String) returns popupmenu7 contents as cell array
% contents{get(hObject,Value)} returns selected item from popupmenu7


% --- Executes during object creation, after setting all properties.
function popupmenu7_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor))
set(hObject,BackgroundColor,white);
end



function edit40_Callback(hObject, eventdata, handles)
% hObject handle to edit40 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,String) returns contents of edit40 as text
% str2double(get(hObject,String)) returns contents of edit40 as a double


% --- Executes during object creation, after setting all properties.
function edit40_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit40 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor))
set(hObject,BackgroundColor,white);
end



function edit41_Callback(hObject, eventdata, handles)
% hObject handle to edit41 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,String) returns contents of edit41 as text
% str2double(get(hObject,String)) returns contents of edit41 as a double


% --- Executes during object creation, after setting all properties.
function edit41_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit41 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor))
set(hObject,BackgroundColor,white);
end



function edit42_Callback(hObject, eventdata, handles)
% hObject handle to edit42 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,String) returns contents of edit42 as text
% str2double(get(hObject,String)) returns contents of edit42 as a double


% --- Executes during object creation, after setting all properties.
function edit42_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit42 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor))
set(hObject,BackgroundColor,white);
end


% --- Executes on selection change in popupmenu8.
function popupmenu8_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,String) returns popupmenu8 contents as cell array
% contents{get(hObject,Value)} returns selected item from popupmenu8


% --- Executes during object creation, after setting all properties.
function popupmenu8_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor))
set(hObject,BackgroundColor,white);
end


% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cla(handles.axes1,reset);%重置坐标1和坐标2
cla(handles.axes2,reset);
data1=get(handles.uitable1,data);
global totalAp;
global AX;
global AY;
global str1;
global str2;
global length1;
global width;
global flag;
global N;
cnt=1;
%total_ap=get(handles.edit3,string);
%while cnt %set(p(cnt),XData,data1(cnt,1),YData,data1(cnt,2));
%cnt=cnt+1;
%end
staion_num=get(handles.edit1,string);%为用户个数;
N=str2num(staion_num);
apnum=get(handles.edit3,string);%为AP个数;
totalAp=str2num(apnum);
AX=str2num(str1)*rand(1,N);%随机产生一个【0-20】的一阶矩正
AY=str2num(str2)*rand(1,N);%随机产生一个【0-20】的一阶矩正

axes(handles.axes1);
[num,x,y]=condition(flag,str1,str2,length1,width,0);
if flag==3
plot(x,y);
hold on;
end
plot(AX,AY,o);
hold on;
for ap_num=1:totalAp %绘制AP的位置并加标注
data2(ap_num,:)=data1(ap_num,:);
plot(data1(ap_num,1),data1(ap_num,2),p:b);
ap_text=strcat( strcat(AP,num2str(ap_num)),点);%标注AP的个数
text(data1(ap_num,1)+1,data1(ap_num,2)+1,ap_text);
hold on;
end
[y_through]=calc_ap_through(AX,AY,N,data1);
%得到每个点的吞吐量之后,利用分段插值法得到等高线曲线和伪色图
contour_t(y_through);

axes(handles.axes2);
[num,x,y]=condition(flag,str1,str2,length1,width,0);
if flag==3
plot(x,y);
hold on;
end
plot(AX,AY,o);
hold on;
for ap_num=1:totalAp %绘制AP的位置并加标注
plot(data2(ap_num,1),data2(ap_num,2),p:b);
ap_text=strcat( strcat(AP,num2str(ap_num)),点);%标注AP的个数
text(data2(ap_num,1)+1,data2(ap_num,2)+1,ap_text);
hold on;
end

waitbar_title = 正在绘制映射后的SINR图...;
% Create Waitbar
wait_bar = waitbar(0,waitbar_title,Name, WLAN GUI Processing...,...
windowstyle, modal);
waitbar(3/1,wait_bar);
N_C=64;%子载波
for n=1:N_C
[SINR(n,:)]=SINR_s(data2(:,1),data2(:,2),AX,AY);
pause(0.1);
end
waitbar(3/2,wait_bar);
for m=1:length(AX)
for n=1:64
sinr(n)=SINR(n,m);%第m个用户的64个sinr
end
[SINR_e(m)]=ALG1(sinr);
end
[Through_output_max]=per(SINR_e);

% Waitbar Update
waitbar(1/1,wait_bar);
delete(wait_bar);

contour_t(Through_output_max);

%{
global A;
[dfile dpath ]=uigetfile({*.xls;*.xlsx;*.txt,data(*.xls;*.xlsx;*.txt)},Pick a data);
dfile=strcat(dpath,dfile);
if length(dfile)==0
return ;
end

try

A=xlsread(dfile);

disp(A);
for i=1:3
for j=1:2
disp(A(i,j));
end
end


catch

x=textread([dpath dfile]);

end
%}

% --- Executes on button press in pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

%set(handles.pushbutton12,enable,on);%将链路预算的按钮置为不可用

[y,Fs,bits] = wavread(music.wav); %获取音乐数据
global ao
ao= analogoutput(winsound); %建立硬件对象
addchannel(ao,[1 2]); %创建声音输出通道
set(ao,SampleRate,Fs) %设置采样率
data1 =y(:,1); %双声道
data2 =y(:,2);
putdata(ao,[data1 data2]); %往声卡堆音乐数据
start(ao); %输出音乐数据

% --- Executes during object creation, after setting all properties.
function pushbutton11_CreateFcn(hObject, eventdata, handles)
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called


% --- Executes on button press in pushbutton12.
function pushbutton12_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global ao;
stop(ao); %输出音乐数据

% --- Executes during object creation, after setting all properties.
function pushbutton12_CreateFcn(hObject, eventdata, handles)
% hObject handle to pushbutton12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called


% --- Executes during object creation, after setting all properties.
function uitable1_CreateFcn(hObject, eventdata, handles)
% hObject handle to uitable1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
data=zeros(20,2);
set(hObject,data,data);

% --- Executes on key press with focus on popupmenu1 and none of its controls.
function popupmenu1_KeyPressFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata structure with the following fields (see UICONTROL)
% Key: name of the key that was pressed, in lower case
% Character: character interpretation of the key(s) that was pressed
% Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
% handles structure with handles and user data (see GUIDATA)
global flag;
flag=get(handles.popupmenu1,value);
a;


% --- Executes on button press in pushbutton16.
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton16 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
data1=get(handles.uitable1,data);
global AX;
global AY;
global str1;
global str2;
global N;
global paraAll;
%{
global apPoint;
global apPoint_1;
global apPoint_2;
global ax;
global ay;
%}
cnt=1;
staion_num=get(handles.edit1,string);%为用户个数;
N=str2num(staion_num);
apnum=get(handles.edit3,string);%为AP个数;
totalAp=str2num(apnum);
%{
ax=str2num(str1)*rand(1,N-totalAp );%随机产生一个【0-20】的一阶矩正
ay=str2num(str2)*rand(1,N-totalAp );%随机产生一个【0-20】的一阶矩正
apPoint_1=apPoint+1;
apPoint_2=apPoint_1;
AX=[ax,apPoint_2(1,:)];
AY=[ay,apPoint_2(2,:)];
%}
AX=str2num(str1)*rand(1,N);%随机产生一个【0-20】的一阶矩正
AY=str2num(str2)*rand(1,N);%随机产生一个【0-20】的一阶矩正
axes(handles.axes1);
[m,n]=size(paraAll);
for row=1:m
plot([paraAll(row,1),paraAll(row,3)],[paraAll(row,2),paraAll(row,4)],b);
hold on;
end
plot(AX,AY,o);
hold on;
for ap_num=1:totalAp %绘制AP的位置并加标注
data2(ap_num,:)=data1(ap_num,:);
plot(data1(ap_num,1),data1(ap_num,2),p:b);
ap_text=strcat( strcat(AP,num2str(ap_num)),点);%标注AP的个数
text(data1(ap_num,1)+1,data1(ap_num,2)+1,ap_text);
hold on;
end
[RSSI]=calc_ap_through(AX,AY,N,data2);
%[y_through,Pr_sum_col_01,calcAdjacentChannelRejection]=calc_ap_through(AX,AY,N,data2);
%contour_t(Pr_sum_col_01);
contour_t(RSSI);
xlabel(场景的长度(单位m));
ylabel(场景的宽度(单位m));
title(信号强度图(单位:dB));


% --- Executes on button press in pushbutton17.
function pushbutton17_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton17 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
data1=get(handles.uitable1,data);
global AX;
global AY;
global str1;
global str2;
global N;
global paraAll;
cnt=1;
staion_num=get(handles.edit1,string);%为用户个数;
N=str2num(staion_num);
apnum=get(handles.edit3,string);%为AP个数;
totalAp=str2num(apnum);
AX=str2num(str1)*rand(1,N);%随机产生一个【0-20】的一阶矩正
AY=str2num(str2)*rand(1,N);%随机产生一个【0-20】的一阶矩正
axes(handles.axes1);
[m,n]=size(paraAll);
for row=1:m
plot([paraAll(row,1),paraAll(row,3)],[paraAll(row,2),paraAll(row,4)],b);
hold on;
end
%{
[num,x,y]=condition(flag,str1,str2,length1,width,0);
if flag==3
plot(x,y);
hold on;
end
%}
plot(AX,AY,o);
hold on;
for ap_num=1:2 %绘制AP的位置并加标注 此时只做了两个AP的
data2(ap_num,:)=data1(ap_num,:);
plot(data1(ap_num,1),data1(ap_num,2),p:b);
ap_text=strcat( strcat(AP,num2str(ap_num)),点);%标注AP的个数
text(data1(ap_num,1)+1,data1(ap_num,2)+1,ap_text);
hold on;
end
[y_through,Pr_sum_col_01,calcAdjacentChannelRejection]=calc_ap_through(AX,AY,N,data2);
contour_t(calcAdjacentChannelRejection);



% --- Executes on button press in pushbutton18.
function pushbutton18_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton18 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
data1=get(handles.uitable1,data);
global AX;
global AY;
global str1;
global str2;
global N;
global paraAll;
cnt=1;
staion_num=get(handles.edit1,string);%为用户个数;
N=str2num(staion_num);
apnum=get(handles.edit3,string);%为AP个数;
totalAp=str2num(apnum);
AX=str2num(str1)*rand(1,N);%随机产生一个【0-20】的一阶矩正
AY=str2num(str2)*rand(1,N);%随机产生一个【0-20】的一阶矩正
axes(handles.axes2);
[m,n]=size(paraAll);
for row=1:m
plot([paraAll(row,1),paraAll(row,3)],[paraAll(row,2),paraAll(row,4)],b);
hold on;
end
plot(AX,AY,o);
hold on;
for ap_num=1:totalAp %绘制AP的位置并加标注
data2(ap_num,:)=data1(ap_num,:);
plot(data1(ap_num,1),data1(ap_num,2),p:b);
ap_text=strcat( strcat(AP,num2str(ap_num)),点);%标注AP的个数
text(data1(ap_num,1)+1,data1(ap_num,2)+1,ap_text);
hold on;
end
[CarrierInferenceRatio]=calc_ap_through(AX,AY,N,data2);
contour_t(CarrierInferenceRatio);
xlabel(场景的长度(单位m));
ylabel(场景的宽度(单位m));
title(载干比图);
调用的ALG函数

function [sinr]=ALG(P_loss1,s1,ditaf,Pt,ap_num)

global l;
N0=10^(-15);%噪声功率谱密度
num=length(s1);
%将传来的1*num的二维数组(虽然只有一行)转变为一位数组
P_loss=reshape(P_loss1,1,num);
s=reshape(s1,1,num);
T=1;
T_interval=1/5;
Nc=T/T_interval;
for ap=1:ap_num
H(ap,:,:)=channel(Nc);
end
obj=s(1);
temp1=0;
for m=1:4
h(m,:)=reshape(H(obj,m,:),1,Nc);
temp1=temp1+(norm(h(m)))^2;%norm(x)指向量或矩阵x的范数eg:x=1,3,4,5,6;norm(x)=sqrt(1+9+16+25+36);
end
Ps=10^((Pt-P_loss(obj))/10)/2*temp1^2;
Pn=N0*ditaf*temp1;

temp2=0;
temp3=0;
PL=0;
if ap_num==1
Pn=Pn*10^5;
else
for l=2:length(s)
x=conj(H(obj,1,:)).*H(s(l),1,:)+conj(H(obj,3,:)).*H(s(l),3,:)+conj(H(s(l),2,:)).*H(obj,2,:)+conj(H(s(l),4,:)).*H(obj,4,:);%conj指取共轭复数
x=reshape(x,1,Nc);
temp2=temp2+x;
y=conj(H(s(l),1,:)).*H(obj,2,:)+conj(H(s(l),3,:)).*H(obj,4,:)-conj(H(obj,1,:)).*H(s(l),2,:)-conj(H(obj,3,:)).*H(s(l),4,:);
y=reshape(y,1,Nc);
temp3=temp3+y;
PL=PL+(10^((Pt-P_loss(s(l)))/10)/2)*((norm(temp2))^2+(norm(temp3))^2);

end
end
sinr=Ps/(PL+Pn);
sinr=10*log10(sinr);



老师给的代码都在这几个里面 了 希翼知道的大神可以联系一下我,拯救一下担惊受怕的未毕业女屌丝
回答时间:2013-5-24 11:32
 
我要回应:  回应字数在5000字以内

 

XML 地图 | Sitemap 地图