%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% FILE: varakuva.m
%%
%% Piirretään vara-hyötysäntöä vastaavia hyötyfunktioita
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## Dataa tulosteille
r0 = [100 500 1000];
N = 10000;
r = linspace(0,2000,N);

for i=1:length(r0)
    for j=1:length(r)
        u(i,j) = 1-exp(-r(j)/r0(i));
    end    
end    

plot(r,u, "linewidth", 4)
grid on
set(gca, "fontsize", 24);
%% PDF-asetteluja
orient("landscape");
ps = get(gcf, "papersize"); 
%ps(2) = 0.5*ps(2);
%set(gcf, 'papersize', ps);
br = -1.10;                         
set(gcf, "paperposition", [0.20*br, .25*br, ps(1)-0.40*br, ps(2)-.5*br]);
print("varakuva.pdf");


