<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3114962351756133914</id><updated>2012-02-07T22:41:51.630Z</updated><category term='gnuplot'/><category term='SLI'/><category term='averaging'/><category term='xorg'/><category term='awk'/><category term='archive'/><category term='delete'/><category term='cuda'/><category term='epstopdf'/><category term='convert'/><category term='rm'/><category term='latex'/><category term='edred'/><category term='formatting'/><category term='fitting'/><category term='vim'/><category term='ubuntu'/><category term='bash'/><category term='dual GPU'/><category term='nvidia'/><category term='scripts'/><category term='VGA'/><category term='pdf'/><category term='eps2pdf'/><title type='text'>Computational Magnetism York</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-3480717541088618322</id><published>2009-10-15T12:43:00.001+01:00</published><updated>2009-10-15T12:45:08.433+01:00</updated><title type='text'>cropping pdfs from terminal</title><content type='html'>From terminal you can use pdfcrop, which should be installed on most linux systems. As its terminal based it is easier to script.&lt;br /&gt;&lt;br /&gt;example&lt;br /&gt;&lt;br /&gt;pdfcrop --margins '5 0 5 10' --clip input.pdf output.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-3480717541088618322?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/3480717541088618322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/10/cropping-pdfs-from-terminal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3480717541088618322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3480717541088618322'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/10/cropping-pdfs-from-terminal.html' title='cropping pdfs from terminal'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-1217378118854624073</id><published>2009-09-04T11:25:00.000+01:00</published><updated>2009-09-04T11:26:23.719+01:00</updated><title type='text'>Make tar.gz</title><content type='html'>tar czvf myarchive.tar.gz myfile&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-1217378118854624073?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/1217378118854624073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/09/make-targz.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/1217378118854624073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/1217378118854624073'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/09/make-targz.html' title='Make tar.gz'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-3674694310877744813</id><published>2009-06-15T12:47:00.000+01:00</published><updated>2009-06-15T12:48:11.766+01:00</updated><title type='text'>Multiple files in gnuplot</title><content type='html'>Seems obvious now but you can use paste&lt;br /&gt;&lt;br /&gt;e.g. &lt;br /&gt;&lt;br /&gt;plot "&lt; paste file1.dat file2.dat" using 1:($2/$4) w points&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-3674694310877744813?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/3674694310877744813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/06/multiple-files-in-gnuplot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3674694310877744813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3674694310877744813'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/06/multiple-files-in-gnuplot.html' title='Multiple files in gnuplot'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-8951633005082215921</id><published>2009-06-15T11:43:00.004+01:00</published><updated>2009-06-15T11:45:46.370+01:00</updated><title type='text'>Searching for tabs with grep</title><content type='html'>I was trying to search for an integer number, which had tabs after is&lt;br /&gt;i.e grep 300 &lt;file&gt; and it would come up with something like&lt;br /&gt;300  -0.0137598  -0.00228325  0.930859  0.932037  -1.04561e+27  -1.73505e+26  7.07363e+28  7.08259e+28  -0.0129162  -0.00224769  0.874459  0.875568  0.00575037 0.00194563  -0.395375  0.396846  1.46282e+24&lt;br /&gt;450  -0.00449249  -0.00663059  0.858427  0.869783  -3.41386e+26  -5.03861e+26  6.52322e+28  6.60951e+28  -0.00415084  -0.00613002  0.795084  0.805603  0.00124869 0.00187794  -0.257016  0.262097  1.46282e+24&lt;br /&gt;etc....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;i.e. where there is 300 within any number. To search for 300&lt;TAB&gt; i used&lt;br /&gt;grep 300[[:space:]]  &lt;file&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-8951633005082215921?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/8951633005082215921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/06/searching-for-tabs-with-grep.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/8951633005082215921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/8951633005082215921'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/06/searching-for-tabs-with-grep.html' title='Searching for tabs with grep'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-2262673249925521224</id><published>2009-05-22T09:19:00.001+01:00</published><updated>2009-05-22T09:20:39.549+01:00</updated><title type='text'>Wireless with Linux</title><content type='html'>This link shows how it is set up using the gnome GUI network manager&lt;br /&gt;&lt;br /&gt;http://www.york.ac.uk/services/cserv/net/wireless/help/naslinuxnew.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-2262673249925521224?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/2262673249925521224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/05/wireless-with-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/2262673249925521224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/2262673249925521224'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/05/wireless-with-linux.html' title='Wireless with Linux'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-1618564861532673666</id><published>2009-04-02T09:08:00.003+01:00</published><updated>2009-04-02T09:31:45.476+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SLI'/><category scheme='http://www.blogger.com/atom/ns#' term='VGA'/><category scheme='http://www.blogger.com/atom/ns#' term='xorg'/><category scheme='http://www.blogger.com/atom/ns#' term='nvidia'/><category scheme='http://www.blogger.com/atom/ns#' term='cuda'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='dual GPU'/><title type='text'>Getting xorg to recognise two GPU's</title><content type='html'>In Ubuntu 8.10, after installation of the nvidia driver, xorg is unable to decide which card to use. To fix this, login in to a terminal, and then type&lt;br /&gt;&lt;br /&gt;sudo lspci  grep VGA&lt;br /&gt;&lt;br /&gt;On my machine this gave the following output:&lt;br /&gt;02:00.0 VGA compatible controller: nVidia Corporation Device 05e2 (rev a1)&lt;br /&gt;04:00.0 VGA compatible controller: nVidia Corporation Device 05e2 (rev a1)&lt;br /&gt;&lt;br /&gt;So to get the xserver working, you need to add the following line oin the device section of /etc/X11/xorg.conf:&lt;br /&gt;&lt;br /&gt;Section "Device"&lt;br /&gt;Identifier "Configured Video Device"&lt;br /&gt;Busid "PCI:2:0:0"&lt;br /&gt;Driver "nvidia"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Then run:&lt;br /&gt;&lt;br /&gt;sudo service gdm restart&lt;br /&gt;&lt;br /&gt;to get the xserver working as normal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-1618564861532673666?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/1618564861532673666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/04/getting-xorg-to-recognise-two-gpus.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/1618564861532673666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/1618564861532673666'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/04/getting-xorg-to-recognise-two-gpus.html' title='Getting xorg to recognise two GPU&apos;s'/><author><name>Richard Evans</name><uri>http://www.blogger.com/profile/11399216412647390748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-6035932313900897248</id><published>2009-03-31T14:11:00.001+01:00</published><updated>2009-03-31T14:12:35.651+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='archive'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Bash extract function</title><content type='html'>Extract function for bash. Put in .bashrc&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;function extract()  # Handy Extract Program.&lt;br /&gt;{&lt;br /&gt;  if [ -f $1 ] ; then&lt;br /&gt;    case $1 in&lt;br /&gt;      *.tar.bz2)   tar xvjf $1     ;;  &lt;br /&gt;      *.tar.gz)    tar xvzf $1     ;;  &lt;br /&gt;      *.bz2)       bunzip2 $1      ;;  &lt;br /&gt;      *.rar)       unrar x $1      ;;  &lt;br /&gt;      *.gz)        gunzip $1       ;;  &lt;br /&gt;      *.tar)       tar xvf $1      ;;  &lt;br /&gt;      *.tbz2)      tar xvjf $1     ;;  &lt;br /&gt;      *.tgz)       tar xvzf $1     ;;  &lt;br /&gt;      *.zip)       unzip $1        ;;  &lt;br /&gt;      *.Z)         uncompress $1   ;;  &lt;br /&gt;      *.7z)        7z x $1         ;;  &lt;br /&gt;      *)           echo "'$1' cannot be extracted via &gt;extract&lt;" ;;&lt;br /&gt;    esac&lt;br /&gt;  else&lt;br /&gt;      echo "'$1' is not a valid file"&lt;br /&gt;  fi  &lt;br /&gt;}&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-6035932313900897248?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/6035932313900897248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/bash-extract-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/6035932313900897248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/6035932313900897248'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/bash-extract-function.html' title='Bash extract function'/><author><name>Patrick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-4648392976389438913</id><published>2009-03-27T14:32:00.000Z</published><updated>2009-03-27T14:33:17.482Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='eps2pdf'/><category scheme='http://www.blogger.com/atom/ns#' term='epstopdf'/><category scheme='http://www.blogger.com/atom/ns#' term='convert'/><title type='text'>epstopdf</title><content type='html'>It's epstopdf joe not eps2pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-4648392976389438913?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/4648392976389438913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/epstopdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/4648392976389438913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/4648392976389438913'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/epstopdf.html' title='epstopdf'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-7694478887251188826</id><published>2009-03-27T10:40:00.001Z</published><updated>2009-03-27T10:41:26.883Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='edred'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='delete'/><title type='text'>Fixing backspace on edred vim</title><content type='html'>To fix the backspace key on the vim on edred add this to .vimrc&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;set backspace=indent,eol,start&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-7694478887251188826?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/7694478887251188826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/fixing-backspace-on-edred-vim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/7694478887251188826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/7694478887251188826'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/fixing-backspace-on-edred-vim.html' title='Fixing backspace on edred vim'/><author><name>Patrick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-2934797714945984473</id><published>2009-03-26T16:15:00.001Z</published><updated>2009-03-26T16:17:24.400Z</updated><title type='text'>latex figures</title><content type='html'>To get rid of strange behaviour in latex where it does weird things with figure numbers its has to be done in a strict order.&lt;br /&gt;&lt;br /&gt;\begin{figure}&lt;br /&gt;    \begin{center}&lt;br /&gt;        \includegraphics{...}&lt;br /&gt;    \end{center}&lt;br /&gt;    \caption{...}&lt;br /&gt;    \label{...}&lt;br /&gt;\end{figure}&lt;br /&gt;&lt;br /&gt;I think caption can go above \begin{center} but it must be outside of the centre section&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-2934797714945984473?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/2934797714945984473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/latex-figures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/2934797714945984473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/2934797714945984473'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/latex-figures.html' title='latex figures'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-3969888614573095484</id><published>2009-03-26T13:38:00.002Z</published><updated>2009-03-26T13:41:58.891Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>Gnuplot PDF+Latex files</title><content type='html'>To create a pdf file from gnuplot with latex text do the following:&lt;br /&gt;&lt;br /&gt;In the plot use the terminal:&lt;br /&gt;&lt;blockquote&gt;set terminal epslatex&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then convert the eps to a pdf file.&lt;br /&gt;&lt;br /&gt;Include the figure using&lt;br /&gt;&lt;blockquote&gt;\input{figure.tex}&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-3969888614573095484?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/3969888614573095484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/gnuplot-pdflatex-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3969888614573095484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3969888614573095484'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/gnuplot-pdflatex-files.html' title='Gnuplot PDF+Latex files'/><author><name>Patrick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-6287305342904738215</id><published>2009-03-25T14:38:00.004Z</published><updated>2009-03-25T14:41:04.310Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fitting'/><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><title type='text'>Printing variables from gnuplot to a file</title><content type='html'>To output variables such as fitting parameters from gnuplot use.&lt;div&gt;&lt;blockquote&gt;set fit errorvariables # creates a_err type variables for fitting errors&lt;br /&gt;&lt;div&gt;set print "tmp.dat"&lt;/div&gt;&lt;div&gt;print a,a_err,b,b_err&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-6287305342904738215?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/6287305342904738215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/printing-variables-from-gnuplot-to-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/6287305342904738215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/6287305342904738215'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/printing-variables-from-gnuplot-to-file.html' title='Printing variables from gnuplot to a file'/><author><name>Patrick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-3711990863835545854</id><published>2009-03-25T11:49:00.006Z</published><updated>2009-03-25T11:58:28.108Z</updated><title type='text'>Cross Product</title><content type='html'>I got sick of working out cross products by hand. So i wrote a C program to calculate it. Bit over the top but oh well. I won't save the source code just when i need it I will get it from here. If anyone can be arsed to change/edit it or make an applet then go ahead.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;#include &amp;lt iostream&amp;gt&lt;br /&gt;#include &amp;lt cstdlib&amp;gt&lt;br /&gt;#include &amp;lt cmath&amp;gt&lt;br /&gt;&lt;br /&gt;void cross_product(double*&amp;,double*&amp;,double*&amp;);&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; double *vec1=NULL,*vec2=NULL,*vec3=NULL;&lt;br /&gt; &lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;    vec1 = new double[3];&lt;br /&gt; }&lt;br /&gt; catch(...)&lt;br /&gt; {&lt;br /&gt;    std::cerr &amp;lt&amp;lt "Error Allocating vec1" &amp;lt&amp;lt std::endl;&lt;br /&gt;    exit(0);&lt;br /&gt; }&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;    vec2 = new double[3];&lt;br /&gt; }&lt;br /&gt; catch(...)&lt;br /&gt; {&lt;br /&gt;    std::cerr &amp;lt&amp;lt "Error Allocating vec2" &amp;lt&amp;lt std::endl;&lt;br /&gt;    exit(0);&lt;br /&gt; }&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;    vec3 = new double[3];&lt;br /&gt; }&lt;br /&gt; catch(...)&lt;br /&gt; {&lt;br /&gt;    std::cerr &amp;lt&amp;lt "Error Allocating vec3" &amp;lt&amp;lt std::endl;&lt;br /&gt;    exit(0);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; //Initialise Arrays&lt;br /&gt; for(unsigned int i = 0 ; i &amp;lt 3 ; i++)&lt;br /&gt; {&lt;br /&gt;    vec1[i] = 0.0;&lt;br /&gt;    vec2[i] = 0.0;&lt;br /&gt;    vec3[i] = 0.0;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; for(unsigned int i = 0 ; i &amp;lt 3 ; i++)&lt;br /&gt; {&lt;br /&gt;    std::cout &amp;lt&amp;lt "Enter element " &amp;lt&amp;lt i+1 &amp;lt&amp;lt " of the first array and press enter" &amp;lt&amp;lt std::endl;&lt;br /&gt;    std::cin &amp;gt&amp;gt vec1[i];&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; for(unsigned int i = 0 ; i &amp;lt 3 ; i++)&lt;br /&gt; {&lt;br /&gt;    std::cout &amp;lt&amp;lt "Enter element " &amp;lt&amp;lt i+1 &amp;lt&amp;lt " of the second array and press enter" &amp;lt&amp;lt std::endl;&lt;br /&gt;    std::cin &amp;gt&amp;gt vec2[i];&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;   std::cout &amp;lt&amp;lt "The vectors you entered were \nvec1 = " &amp;lt&amp;lt vec1[0] &amp;lt&amp;lt "\t" &amp;lt&amp;lt vec1[1] &amp;lt&amp;lt "\t" &amp;lt&amp;lt vec1[2] &amp;lt&amp;lt &lt;br /&gt;   "\nvec2 = " &amp;lt&amp;lt vec2[0] &amp;lt&amp;lt "\t" &amp;lt&amp;lt vec2[1] &amp;lt&amp;lt "\t" &amp;lt&amp;lt vec2[2] &amp;lt&amp;lt std::endl;&lt;br /&gt;&lt;br /&gt;   cross_product(vec1,vec2,vec3);&lt;br /&gt;&lt;br /&gt;   std::cout &amp;lt&amp;lt "The results of the cross product of the vector you entered is \n" &amp;lt&amp;lt vec3[0] &amp;lt&amp;lt "\t" &amp;lt&amp;lt vec3[1] &amp;lt&amp;lt "\t" &amp;lt&amp;lt vec3[2] &amp;lt&amp;lt std::endl;&lt;br /&gt; &lt;br /&gt; return(0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void cross_product(double*&amp; vec1,double*&amp; vec2,double*&amp; vec3)&lt;br /&gt;{&lt;br /&gt;   vec3[0] = vec1[1]*vec2[2] - vec1[2]*vec2[1];&lt;br /&gt;   vec3[1] = vec1[2]*vec2[0] - vec1[0]*vec2[2];&lt;br /&gt;   vec3[2] = vec1[0]*vec2[1] - vec1[1]*vec2[0];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-3711990863835545854?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/3711990863835545854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/cross-product.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3711990863835545854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3711990863835545854'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/cross-product.html' title='Cross Product'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-7268108498403484331</id><published>2009-03-24T13:06:00.000Z</published><updated>2009-03-24T13:10:00.533Z</updated><title type='text'>Labeling figures in Latex</title><content type='html'>If labeling of figures has gone wrong in latex it's probably because the \label{} must be at the end of the figure block after the includegraphics and caption.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-7268108498403484331?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/7268108498403484331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/labelling-figures-in-latex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/7268108498403484331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/7268108498403484331'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/labelling-figures-in-latex.html' title='Labeling figures in Latex'/><author><name>Patrick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-2507939164651543389</id><published>2009-03-24T11:57:00.001Z</published><updated>2009-04-02T10:03:21.220+01:00</updated><title type='text'>Compiling OpenMPI with Intel Compilers on Ubuntu</title><content type='html'>Compiling OpenMPI with Intel compilers can be a bit of a nuisance, and so the following seems to work with version 11.074 Intel Compilers, OpenMPI v 2.8.1 and Ubuntu 8.10:&lt;br /&gt;&lt;br /&gt;1) Install The Intel Compilers with defaults&lt;br /&gt;2) Put iccvars.sh and ifortvars.sh into /etc/profile.d, and comment out the lines referring to non 64 bit binaries&lt;br /&gt;3) source /etc/profile&lt;br /&gt;4) Unpack the OpenMPI&lt;br /&gt;5) Run ./configure --with-fortran CXX=icc FC=ifort LIBS=-lstdc++&lt;br /&gt;6) type LANG=C&lt;br /&gt;7) make all&lt;br /&gt;8) sudo make all install&lt;br /&gt;9) sudo ldconfig&lt;br /&gt;10) type mpiCC --showme to verify the compiler wrappers are working correctly&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-2507939164651543389?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/2507939164651543389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/compiling-openmpi-with-intel-compilers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/2507939164651543389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/2507939164651543389'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/compiling-openmpi-with-intel-compilers.html' title='Compiling OpenMPI with Intel Compilers on Ubuntu'/><author><name>Richard Evans</name><uri>http://www.blogger.com/profile/11399216412647390748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-3530400759168557757</id><published>2009-03-24T11:16:00.001Z</published><updated>2009-03-24T11:28:19.727Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='averaging'/><category scheme='http://www.blogger.com/atom/ns#' term='scripts'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><title type='text'>Awk Scripting, combining columns</title><content type='html'>If you have multiple files named filename.&amp;lt a number &amp;gt e.g. filename.0, filename.1, filename.2,filename.3 etc then you can take an average of multiple columns using awk as below:&lt;br /&gt;&lt;br /&gt;you need to know how many files you have, in this num_files=16, and you need to know the total number of columns per file in this tot_num_cols=13. Here I wanted to average colums 1 and 4. Using the paste command which pastes a number of files to the screen side by side and piping to awk the script will output the average of columns 1 and 4 to a file called anewfile.txt&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;paste filename.* | awk 'BEGIN{num_col=4;num_files=16;timecol=1;tot_num_cols} {c=0; for (j=0;j &amp;lt num_files;j++){c+=$(timecol+tot_num_cols*j)}}; s="0;" i="0;i &amp;lt ="num_files;i++){s+="$(num_col+tot_num_cols*i)};" &amp;gt | anewfile.txt&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-3530400759168557757?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/3530400759168557757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/awk-scripting-combining-columns.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3530400759168557757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3530400759168557757'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/awk-scripting-combining-columns.html' title='Awk Scripting, combining columns'/><author><name>tomas</name><uri>http://www.blogger.com/profile/04959304041110068503</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3114962351756133914.post-3773643330456124008</id><published>2009-03-24T11:04:00.000Z</published><updated>2009-03-24T11:23:59.445Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rm'/><category scheme='http://www.blogger.com/atom/ns#' term='scripts'/><category scheme='http://www.blogger.com/atom/ns#' term='formatting'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Bash number formatting</title><content type='html'>Use printf as in c. For zero padding add a 0 infront of the field length, eg: %06i&lt;br /&gt;&lt;br /&gt;So to delete more files than rm can handle&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;for i in `seq 0 100`; do file=`printf "%06i" "$i"`; echo $file; done&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3114962351756133914-3773643330456124008?l=compmagyork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compmagyork.blogspot.com/feeds/3773643330456124008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://compmagyork.blogspot.com/2009/03/bash-number-formatting.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3773643330456124008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3114962351756133914/posts/default/3773643330456124008'/><link rel='alternate' type='text/html' href='http://compmagyork.blogspot.com/2009/03/bash-number-formatting.html' title='Bash number formatting'/><author><name>Patrick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
