Reducing the number of data points on the grapth

조회 수: 40 (최근 30일)
Aftab Ahmed Khan
Aftab Ahmed Khan 2018년 3월 9일
댓글: Walter Roberson 2018년 3월 9일
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에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by