Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to identify the user number with respect to the following code in the attached graph.

1 visualización (últimos 30 días)
clear all;
clc;
user=2
subcarrier=4
for t = 1:length(user)
radius=3
X=ones(1,user(t))
Y=ones(1,user(t))
R=radius*(rand(1,user(t)))
th = 0:pi:2*pi
X1=X+R
Y1=Y+R
xaxis = radius * cos(th)
yaxis = radius * sin(th)
figure
plot(xaxis, yaxis)
hold on
plot(Y,X,'r^')
hold on
plot(Y1,X1,'ko')
hold on
c=2*pi
for r = 1:length(subcarrier)
for j=1:user(t)
temp=[];
for n=1:subcarrier(r)
nc=(n-1)*c;
entry=(1+i*nc)/(1+nc^2);
temp=[temp entry]
end
G=randn(subcarrier(r),1)+i*randn(subcarrier(r),1)
H=abs(G)
figure
plot(abs(H),'-*')
hold on
end
end
end
The above code executes and gives me the attached graph.
From the fig 1 how to identify which is user 1 and user 2.
and from fig2 and fig 3 which is for user 1 and user 2.
  1 comentario
Rik
Rik el 15 de En. de 2019
Your code is really confusing, because it lacks comments about what it should be doing. You also don't explain what it is you mean. We are not mind readers, you need to explain these things. This is not your first question.
There are also numerous issues in this code. The debugging tools are really valuable, try to use them. Because of the many times you omit the semicolon, it is not visible at a glance if there are any other issues that were automatically detected.
One of the things you are missing now is that you're using j as a loop index, but then use i in your code. I don't know if that is an error, but it seems odd you wouldn't be using your loop index variable for anything. Avoid i and j as variables to avoid any ambiguity and use 1i to generate the complex unit value.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by