plot value divide error

1 view (last 30 days)
SANDEEP SINGH RANA
SANDEEP SINGH RANA on 6 Jun 2021
Edited: DGM on 6 Jun 2021
for it=1:4305
iteration(it,1)=it;
end
figure;
plot(iteration(:,1),Q(:,2)./(1*10^6),'-o','linewidth',1.5);
xlabel('Number of iterations');
ylabel('Throughput in (MBps)');
%%%%%%%%%%%%%%%%%%
Function Q is matrix of size 4305*14.
Error is in the plot. I am not getting value divided by (1*10^6) due to this my Q function value becoming to near 0.
Please point out where I am missing.
  2 Comments
Manas Minnoor
Manas Minnoor on 6 Jun 2021
Q will become near to zero if the value is divided by 1*10^6, right? Why do you think it is not dividing?
DGM
DGM on 6 Jun 2021
Edited: DGM on 6 Jun 2021
I second Manas. Nobody knows what your numbers are, but dividing things by a big number makes them small. Getting small numbers is anything but an indicator that things are failing to become small.
Make some observations of the range of the data.
[min(Q(:,2)) max(Q(:,2))]
[min(Q(:,2)/1E6) max(Q(:,2)/1E6)]
Maybe that 1E6 scaling factor isn't needed due to an oversight in your calculations or the input scaling.
Also, as an aside,
for it=1:4305
iteration(it,1)=it;
end
is the same as
iteration(:,1) = 1:4305;

Sign in to comment.

Answers (0)

Categories

Find more on Dates and Time 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!