title: adding two different function on one plot
body: <p>How can I add two different built-in Matlab functions on one plot? I have these two which work fine separately.</p>
  
  <p>I know that both of the codes using <code>L</code> for their function so I've changed both of them to <code>R</code> and <code>F</code> and then <code>L=F+R</code> but it didn't work.</p>
  
  <pre><code>R = 1000.0;
  freq = [15:5:1000]*1e9;
  T = 20.0;
  lwd = 0.5;
  F = fogpl(R,freq,T,lwd);
  
  freq = [1:1000]*1e9; 
  RR=[0.75,1.75,2.5,3];
  
  for irr=1:length(RR)
      R = rainpl(10000,freq,RR(irr));
  
      L=R+F;
  
      loglog(freq/1e9,L);
      hold on;
  
      grid
      title('rain attenuation')
      xlabel('Frequency (GHz)') 
      ylabel('Attenuation (dB)') 
  
  end
  </code></pre>
  
  <p>The error in what I've tried only showed the line of <code>L=R+F</code></p>
  
  <pre><code>"Matrix dimensions must agree.
  
  Error in Untitled (line 22)
  L=R+F;"
  </code></pre>