Undefined operator '/' for input arguments of type 'matlab.ui.control.UIControl'.
Show older comments
Hello, Please i have this error whene i run my interface matlab:
Undefined operator '/' for input arguments of type 'matlab.ui.control.UIControl'.
Error in UAQP_power_control_method (line 63)
SINR2=target_SINR/currentSINR;
The code of my function is:
function [Pmacro Pfemto] = UAQP_power_control_method(handles)
Pmacro_dbm=handles.edit1;
%Pmacro_dbm = str2num(get(handles.edit1,'String'));
%Pmacro = (10^(Pmacro_dbm / 10)) / 1000;
Pfemto_max_dbm=handles.edit2;
%Pfemto_max_dbm = str2num(get(handles.edit2,'String'));
%Pfemto_max = (10^(Pfemto_max_dbm / 10)) / 1000;
%Pfemto_def_dbm = str2num(get(handles.edit4,'String'));
Pfemto_def_dbm=handles.edit4;
%Pfemto_def = (10^(Pfemto_def_dbm / 10)) / 1000;
target_SINR =handles.edit5;
%target_SINR = str2double(get(handles.edit5,'String'));
% N21=handles.edit15;
% N31=handles.edit35;
% N1=handles.edit47;
% N2=handles.edit18;
% N3=handles.edit19;
N21 = str2double(get(handles.edit15,'String'));
N31 = str2double(get(handles.edit35,'String'));
N1=str2num(get(handles.edit47,'String'));
N2=str2num(get(handles.edit18,'String'));
N3=str2num(get(handles.edit19,'String'));
coordVectors = get(handles.figure1, 'UserData');
numOfFemtocells = str2num(get(handles.edit20,'String'));
%numOfFemtocells = handles.edit20;
numOfFemtousers = handles.edit11;
numOfMacrocells = 1;
%N1=2;
% numOfFemtousers = str2num(get(handles.edit11,'String'));
P_min=-10;
SINR_th=10;
% N1=round(rand*8);
% N2=round(rand*8);
% N3=round(rand*8);
P0=0.0;
o2=0.4;
o1=0.9;
o3=0.1;
Q21=0.7;
Q31=0.3;
Q22=0.6;
Q32=0.2;
D=0.7;
Pfemto = zeros(1,numOfFemtocells);
% a=o2*Q21;
% b=o2*Q22;
% c=o2*Q31;
% d=o2*Q32;
a = o2*Q21*ones(N2,1);
b = o2*Q22*ones(N2,1 );
c = o2*Q31*ones(N3,1 );
d = o2*Q32*ones(N3,1);
SINR1=0;
SINR2=0;
SINR3=0;
%for i=1:numOfFemtocells
for i=1:N1
currentSINR = findRangeSINR(handles);
SINR1=currentSINR;
end
for i=1:N2
currentSINR = findRangeSINR(handles);
SINR2=target_SINR/currentSINR;
end
for i=1:N3
currentSINR = findRangeSINR(handles);
SINR3=target_SINR/currentSINR;
end
SINRp1=SINR1;
SINRp2=SINR2;
SINRp3=SINR3;
for i=1:numOfFemtocells
if (SINRp1(i+1)> SINR(i) && SINRp2(i+1)> SINR(i)&& SINRp3(i+1)> SINR(i))
Pfemto(i)=P0+(N1*o1)+sum(a(1:N2))+(sum(c(1:N3))*D);
else if (SINRp1(i)> SINR(i) && SINRp2(i+1)> SINR(i))
Pfemto(i)=P0+(N1*o1)+sum(a(1:N2))*D;
else if(SINRp1(i+1)> SINR(i))
Pfemto(i)=P0+(N1*o1)+sum(a(1:N21))*D;
else
Pfemto(i)=Pfemto(i-1);
end
end
end
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!