Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

how to extract the overwritten values inorder to plot the graph

1 visualizzazione (ultimi 30 giorni)
Could anyone tell me how to extract the overwritten values to plot the graph.
  5 Commenti
Prabha Kumaresan
Prabha Kumaresan il 6 Apr 2018
yes that data was different one. For the list_of_N_rng={[1,2,3,4],[5,6,7,8,9]}; the results are
Below results are for rng = 1
output1 = 1.9341e+10
Below results are for rng = 2
output1 = 1.0e+10 * 1.9341 1.6240
Below results are for rng = 3
output1 = 1.0e+10 * 1.9341 1.6240 1.9231
Below results are for rng = 4
output1 = 1.0e+10 * 1.9341 1.6240 1.9231 1.6755
Below results are for rng = 5
output1 = 1.0e+10 * 2.0917 1.6240 1.9231 1.6755
Below results are for rng = 6
output1 = 1.0e+10 * 2.0917 1.8071 1.9231 1.6755
Below results are for rng = 7
output1 = 1.0e+10 * 2.0917 1.8071 2.0985 1.6755
Below results are for rng = 8
output1 = 1.0e+10 * 2.0917 1.8071 2.0985 1.8008
Below results are for rng = 9
output1 = 1.0e+10 * 2.0917 1.8071 2.0985 1.8008 1.3841

Risposte (1)

Walter Roberson
Walter Roberson il 6 Apr 2018
You are three loops deep at the point you assign to output1(), but you only index output1 with the first and third loop variables. Everything for the second loop (seed_index) is going to be overwritten.
  4 Commenti
Walter Roberson
Walter Roberson il 6 Apr 2018
I am confused about what the differences are between the three different questions you have going that look to me to all be about the same topic.
Prabha Kumaresan
Prabha Kumaresan il 6 Apr 2018
Sorry to confuse.What I actually need is I want to plot the values for [1,2,3,4] and [5,6,7,8,9] separately in one graph for the following code
for t= 1:length(N_UE )
list_of_N_rng={[1,2,3,4],[5,6,7,8,9 ]};
for seed_idx = 1 : length(list_of_N_rng )
N_rng=list_of_N_rng{seed_idx };
for s=1:length(N_rng )
....
...
...
output1(t,seed_idx,s)=overall_throughput1 % final result of throughput calculation
...
...
end
end
end
dummyX = 1:length(list_of_N_rng );
figure
plot(dummyX,output1,'rs ');
hold on;grid on;
If i run the code the result which I am getting are
Below results are for rng = 1
output1 =
1.8380e+10
Below results are for rng = 2
output1(:,:,1) =
1.8380e+10
output1(:,:,2) =
2.0014e+10
Below results are for rng = 3
output1(:,:,1) =
1.8380e+10
output1(:,:,2) =
2.0014e+10
output1(:,:,3) =
1.8425e+10
Below results are for rng = 4
output1(:,:,1) =
1.8380e+10
output1(:,:,2) =
2.0014e+10
output1(:,:,3) =
1.8425e+10
output1(:,:,4) =
2.0771e+10
Below results are for rng = 5
output1(:,:,1) =
1.0e+10 *
1.8380 1.9754
output1(:,:,2) =
1.0e+10 *
2.0014 0
output1(:,:,3) =
1.0e+10 *
1.8425 0
output1(:,:,4) =
1.0e+10 *
2.0771 0
Below results are for rng = 6
output1(:,:,1) =
1.0e+10 *
1.8380 1.9754
output1(:,:,2) =
1.0e+10 *
2.0014 2.1991
output1(:,:,3) =
1.0e+10 *
1.8425 0
output1(:,:,4) =
1.0e+10 *
2.0771 0
Below results are for rng = 7
output1(:,:,1) =
1.0e+10 *
1.8380 1.9754
output1(:,:,2) =
1.0e+10 *
2.0014 2.1991
output1(:,:,3) =
1.0e+10 *
1.8425 2.0028
output1(:,:,4) =
1.0e+10 *
2.0771 0
Below results are for rng = 8
output1(:,:,1) =
1.0e+10 *
1.8380 1.9754
output1(:,:,2) =
1.0e+10 *
2.0014 2.1991
output1(:,:,3) =
1.0e+10 *
1.8425 2.0028
output1(:,:,4) =
1.0e+10 *
2.0771 2.1659
Below results are for rng = 9
output1(:,:,1) =
1.0e+10 *
1.8380 1.9754
output1(:,:,2) =
1.0e+10 *
2.0014 2.1991
output1(:,:,3) =
1.0e+10 *
1.8425 2.0028
output1(:,:,4) =
1.0e+10 *
2.0771 2.1659
output1(:,:,5) =
1.0e+10 *
0 2.1944
But I am unable to get the graph for the above result.
Could you please help me to solve it.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by