This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
gibson:teaching:fall-2014:math445:lecture6-diary [2014/09/18 12:16] gibson [Graphical data analysis of log-linear relations] |
gibson:teaching:fall-2014:math445:lecture6-diary [2014/09/18 12:19] gibson [Graphical data analysis of log-linear relations] |
||
---|---|---|---|
Line 278: | Line 278: | ||
>> xdata = D(:,1); | >> xdata = D(:,1); | ||
>> ydata = D(:,2); | >> ydata = D(:,2); | ||
- | >> plot(xdata, ydata,'mo-'); grid on | + | >> plot(xdata, ydata,'mo-'); xlabel('x'); ylabel('y'); grid on |
</code> | </code> | ||
+ | |||
+ | {{ :gibson:teaching:fall-2014:math445:logplot0.png?nolink&400 |}} | ||
<code matlab> | <code matlab> | ||
Line 285: | Line 287: | ||
>> semilogy(xdata, ydata, 'mo-'); xlabel('x'); ylabel('y'); grid on | >> semilogy(xdata, ydata, 'mo-'); xlabel('x'); ylabel('y'); grid on | ||
</code> | </code> | ||
+ | |||
+ | {{ :gibson:teaching:fall-2014:math445:logplot1.png?nolink&400 |}} | ||
<code matlab> | <code matlab> | ||
Line 302: | Line 306: | ||
>> semilogy(xdata, ydata,'mo-', x, 400*10.^(-0.1*x)); xlabel('x'); ylabel('y'); grid on | >> semilogy(xdata, ydata,'mo-', x, 400*10.^(-0.1*x)); xlabel('x'); ylabel('y'); grid on | ||
</code> | </code> | ||
+ | |||
+ | {{ :gibson:teaching:fall-2014:math445:logplot2.png?nolink&400 |}} | ||
<code matlab> | <code matlab> | ||
Line 310: | Line 316: | ||
</code> | </code> | ||
+ | {{ :gibson:teaching:fall-2014:math445:logplot3.png?nolink&400 |}} | ||
<code matlab> | <code matlab> | ||
% so the functional form is y = 700 * 10^(-0.085 x). | % so the functional form is y = 700 * 10^(-0.085 x). | ||
+ | |||
+ | % Don't ask me why Matlab keeps changing the grid lines on the logarithmic plots... | ||
</code> | </code> |