diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-09-04 22:31:22 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-09-04 22:31:22 -0400 |
commit | f95be4fe48544d065f6aa5501fe191e3f61feaed (patch) | |
tree | 2fdbcb12e8f48a25a4b57b4788aec91a044da955 /matlab_usage_source | |
parent | d63c5e175461f19353bde674a5c07bcb78ee5e22 (diff) | |
download | manual_for_Experimental_Atomic_Physics-f95be4fe48544d065f6aa5501fe191e3f61feaed.tar.gz manual_for_Experimental_Atomic_Physics-f95be4fe48544d065f6aa5501fe191e3f61feaed.zip |
small improvements on Matlab usage
Diffstat (limited to 'matlab_usage_source')
-rw-r--r-- | matlab_usage_source/index.t2t | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/matlab_usage_source/index.t2t b/matlab_usage_source/index.t2t index 0cd13e5..7ec51aa 100644 --- a/matlab_usage_source/index.t2t +++ b/matlab_usage_source/index.t2t @@ -1,4 +1,4 @@ -Matlab usage +Matlab usage - short (may be too short) introduction @@ -21,7 +21,7 @@ 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 ] +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 ] ``` @@ -39,8 +39,8 @@ Easy, is not it? [simple_labeled_plot.png] -But **every plot** must be present with title, proper axes labels and -units. Note **'** for the string specifiers +But **every plot must be present with title, proper axes labels and units**. +Note **'** for the string specifiers No our plot is nice and pretty. @@ -50,11 +50,13 @@ No our plot is nice and pretty. = Fixing the range of the axes = Have a look at above plot. We see that one of the axes (y) does not contain -origin point (y=0). Such plots are very common in finances and design to fool a -reader, but they are generally not acceptable in scientific reports. +origin point (y=0). Such plots are very common in finances and design to +fool a reader, but they are generally not acceptable in scientific reports +and definitely not in my class unless you have a good reason to do +otherwise. The fix is very easy. Note that we are actually sending a vector [0,5] to the -ylim function +**``ylim``** function (fir x-axis we need to use **``xlim``** function). ``` ylim([0,5]) Now our plot is good to present @@ -107,7 +109,7 @@ For png output do or if you need a pdf (matlab usually make very bad pdfs) ``` print('V_vs_I.pdf') -Make sure you read documentation for 'print' command there are some useful parameters. +Make sure that you read documentation for **``print``** command there are some useful parameters. |