clc; clearvars; population = 500; % clients-calls-petitions mu = 250; % service rate - system n = [20 40 100 250]; ln = length(n); serviceRate = zeros(population,ln); % service rate per client-call-petition for c=1:ln for x = 1:population; serviceRate(x,c) = min(mu, (n(c)*mu)/x); end end f = plot((1:population)',serviceRate); f(1).LineWidth = 1.5; f(1).Marker = '*'; f(2).LineStyle = ':'; f(2).Marker = 's'; f(2).LineWidth = 1.5; f(3).LineStyle = '-.';f(3).Marker = 'd'; f(3).LineWidth = 1.5; f(4).LineStyle = '--'; f(4).Marker = 'o'; f(4).LineWidth = 1.5; grid on title(['\mu =', num2str(mu)]) xlabel('Number of clients'), ylabel('Service Rate per client') legend({['n = ',num2str(n(1))],['n = ',num2str(n(2))],... ['n = ',num2str(n(3))],['n = ',num2str(n(4))]}, 'Location','northeast')