Reducing the number of data points on the grapth
40 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello How can i reduce the number of data points for every graph? I want the line to be plotted with the original number of data points but the marker should skip every second point.
I'm doing it like this.
clear variables;
close all;
clc;
%%loading the data files.
datafiles4={'Dualhop_TM_OFF_RD_OFF.mat','Dualhop_TM_OFF_RD_On.mat','Dualhop_TM_On_RD_OFF.mat','Dualhop_TM_ON_RD_ON.mat'};%,
% plotting the results one after another.
for scheme=1:numel(datafiles4)
load(datafiles4{scheme});
colorset=['-sg';'-ko';'-r>';'-b*'];
figure(1);
hold on;
grid on;
box on;
Power_Consumption_Rating_Store_hbs=Power_Consumption_Rating_Store_hbs/1e-9;
plot(total_offer_traffic,Power_Consumption_Rating_Store_hbs,colorset(scheme,:),'LineWidth',2);
title('Power Consumption Rating for HBS');
xlabel('Offered Traffic (Gbps)');
ylabel('Power Consumption Rating (nW per bit)');
legend('TM-Off & RD-Off','TM-Off & RD-On','TM-On & RD-Off','TM-On & RD-On','location','southEast');
hold off;
end
0 commentaires
Réponses (1)
Walter Roberson
le 9 Mar 2018
If you have a relatively recent MATLAB then see https://www.mathworks.com/examples/matlab/mw/graphics-ex58554486-control-placement-of-markers-along-line
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!