summaryrefslogtreecommitdiff
path: root/matlab_usage_source
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-09-04 13:54:12 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2013-09-04 13:54:12 -0400
commitf259a610e92a1ae1529915d41067a6cc57857f54 (patch)
tree2bac5a7d62d1b55d9987aef2fdf54fd48068755e /matlab_usage_source
parent8a59f03a7a3e0eba72790372355817b0eb234bce (diff)
downloadmanual_for_Experimental_Atomic_Physics-f259a610e92a1ae1529915d41067a6cc57857f54.tar.gz
manual_for_Experimental_Atomic_Physics-f259a610e92a1ae1529915d41067a6cc57857f54.zip
rephrased matlab usage
Diffstat (limited to 'matlab_usage_source')
-rw-r--r--matlab_usage_source/index.t2t33
1 files changed, 18 insertions, 15 deletions
diff --git a/matlab_usage_source/index.t2t b/matlab_usage_source/index.t2t
index 5038cba..0a20402 100644
--- a/matlab_usage_source/index.t2t
+++ b/matlab_usage_source/index.t2t
@@ -17,18 +17,22 @@ Our data is represented in the following table.
| 3.3 | 3.8 | 0.2 |
| 4.0 | 4.9 | 0.3 |
-First we need to transfer it to the Matlab vector variables. Pay attention to the
-delimiter **;** between numbers
+First of all, we need to transfer it to the Matlab vector variables. Pay
+attention to the delimiter **;** between numbers
-``` I = [ .1; 1.0; 1.8; 3.3; 4.0 ]
-``` V = [ 1.0; 2.2; 3.2; 3.8; 4.9 ]
-``` dV = [ 0.2; 0.1; 0.2; 0.2; 0.3 ]
+```
+I = [ .1; 1.0; 1.8; 3.3; 4.0 ]
+V = [ 1.0; 2.2; 3.2; 3.8; 4.9 ]
+dV = [ 0.2; 0.1; 0.2; 0.2; 0.3 ]
+```
-First we make a plot without error bars just to get the basic, text after
+Now we make a simple plot without error bars to get the basic, text after
**%** is considered as a comment and matlab will disregard it.
-``` figure(1) % all plotting output will go to the particular window
-``` plot(I,V)
+```
+figure(1) % all plotting output will go to the particular window
+plot(I,V)
+```
Easy, is not it?
@@ -38,9 +42,6 @@ Easy, is not it?
But **every plot** must be present with title, proper axes labels and
units. Note **'** for the string specifiers
-``` title('Dependence of voltage on current')
-``` xlabel('Voltage (V)')
-``` ylabel('Current (A)')
No our plot is nice and pretty.
@@ -53,13 +54,15 @@ Let's open a new window for the plot
Now we make plot with error bars assuming that they are the same for up and down parts
-```errorbar(I,V,dV)
+``` errorbar(I,V,dV)
Yet again we need proper labeling
-``` title('Dependence of voltage on current')
-``` xlabel('Voltage (V)')
-``` ylabel('Current (A)')
+```
+title('Dependence of voltage on current')
+xlabel('Voltage (V)')
+ylabel('Current (A)')
+```
[errorbar_plot.png]