Reducing the number of data points on the grapth

33 次查看(过去 30 天)
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

回答(1 个)

Walter Roberson
Walter Roberson 2018-3-9

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by