http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Special:Contributions/Yossi&feed=atom&deletedOnly=&limit=50&target=Yossi&topOnly=&year=&month=Yossi Farjoun's Homepage - User contributions [en]2020-02-26T23:05:37ZFrom Yossi Farjoun's HomepageMediaWiki 1.17.4http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2013-12-15T16:04:47Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://www.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 php5-dev ssh build-essential libusb-dev make libgd-gd2-perl libhttp-date-perl libconfig-general-perl libgd-graph-perl<br />
I added the command<br />
/opt/owfs/bin/owfs -u /mnt/1-wire/ --allow_other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.<br />
<br />
TODO: add a ping from my hosting service to see if snowy is alive...email me if not.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-12-17T03:53:04Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://www.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 php5-dev ssh build-essential libusb-dev make libgd-gd2-perl libhttp-date-perl libconfig-general-perl libgd-graph-perl<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.<br />
<br />
TODO: add a ping from my hosting service to see if snowy is alive...email me if not.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-12-17T03:36:16Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://www.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 php5-dev ssh build-essential libusb-dev make libgd-gd2-perl libhttp-date-perl libconfig-general-perl <br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.<br />
<br />
TODO: add a ping from my hosting service to see if snowy is alive...email me if not.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-12-16T05:51:26Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://www.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 php5-dev ssh build-essential libusb-dev make libgd-gd2-perl libhttp-date-perl<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.<br />
<br />
TODO: add a ping from my hosting service to see if snowy is alive...email me if not.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-30T04:00:58Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://www.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.<br />
<br />
TODO: add a ping from my hosting service to see if snowy is alive...email me if not.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T05:07:41Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.<br />
<br />
TODO: add a ping from my hosting service to see if snowy is alive...email me if not.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T04:20:31Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T04:19:26Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C.<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T04:10:18Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
# As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
# I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
# At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C<br />
#For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
#I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
# The router also needed to be told to route port 22 and 80 to that machine.<br />
# I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
# sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
# The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
# apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin <my gmail address><br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
# For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T04:08:08Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C<br />
<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
<br />
5. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
<br />
6. The router also needed to be told to route port 22 and 80 to that machine.<br />
<br />
7. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
<br />
8. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
<br />
9. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin farjoun@gmail.com<br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
<br />
11. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T04:06:47Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
6. I changed the hostname in /etc/hostname (to snowy) and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
7. The router also needed to be told to route port 22 and 80 to that machine. <br />
8. I opened a free "no-ip" account and created a hostname snowy-farjoun.no-ip.org pointing at snowy. I also installed the client on snowy (apt get didn't work so I did the other way). on my domain registrar I added a CNAME entry pointing from snowy.farjoun.org to snowy-farjoun.no-ip.org. I tested this with ping (I think).<br />
9. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
10. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
11. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin farjoun@gmail.com<br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
At this point, the website should be visible. Check /var/log/apache2/error.log for hints if it isn't working.<br />
12. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
I tested the email configuration using thermd -checkconfig -email verifying that I got an email from the daemon.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T03:53:56Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.thermd.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. As [http://www.maximintegrated.com/app-notes/index.mvp/id/203 here] and [http://ww.hobby-boards.com/store/pages/Wiring-Diagram.html here], I connected the two left pins to the middle wires in a rj12 cable.<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
5. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
6. I needed to change the hostname in /etc/hostname and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
7. The router also needed to be told to route port 22 and 80 to that machine. <br />
8. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
9. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin farjoun@gmail.com<br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory></div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-26T03:52:13Z<p>Yossi: </p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.klein.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. as in [http://www.maximintegrated.com/app-notes/index.mvp/id/203] and [ww.hobby-boards.com/store/pages/Wiring-Diagram.html], I connected the two left pins to the middle wires in a rj12 cable.<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
I then added that line to the /etc/rc.local as well.<br />
5. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
6. I needed to change the hostname in /etc/hostname and added a line in /etc/hosts:<br />
192.168.15.7 snowy snowy.<br />
Since I decided to name the machine snowy and I've decided on the fixed internal address it will have on the router.<br />
7. The router also needed to be told to route port 22 and 80 to that machine. <br />
8. The computer needs to be told not to use DHCP, what are its address, router, network mask and some DNS servers. <br />
9. sshd needs to be installed (for remote administration) apt-get install sshd (probably needs hardening..but "I'll do that later")<br />
10. apache2 was installed (apt-get install apache2?) and configured the default site in /etc/apache2/sites-available/default:<br />
(only changes shown)<br />
ServerAdmin farjoun@gmail.com<br />
... <br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin"><br />
AllowOverride None<br />
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory></div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=House_SensorsHouse Sensors2012-11-25T19:14:39Z<p>Yossi: Created page with "As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freez..."</p>
<hr />
<div>As we have bought a new house with a basement, and we plan to put our chest freezer there, I started worrying about the time it would take us to notice a malfunction in the freezer, the lid left ajar, or a power-outage while we are gone. I decided to monitor the freezer with the following setup:<br />
<br />
* A dedicated "server" (currently [http://www.amazon.com/Acer-AOA150-1447-8-9-Inch-Processor-Sapphire/dp/B001EYV9TM acer one] running [http://ubuntu.org ubuntu] desktop, but I'm thinking of changing that)<br />
* "1-wire" temperature sensor DS18B20 and 1-Wire USB Adaptor from [http://www.hobby-boards.com Hobby Boards]<br />
* [http://owfs.org/ owfs] filesystem to poll the sensor<br />
* [http://http://www.klein.com/ thermd] to log the data, present it in a [http://http://snowy.farjoun.org/cgi-bin/thermd.cgi website] and issue emails in case of problems<br />
* sSMTP on the server to take care of the email.<br />
* DNS records updated using a [http://dreamhost.com DreamHost] hosting and [http://no-ip.com No-Ip] free DynDNS service<br />
* apache2 Server to serve up the website<br />
<br />
I'll try to record the steps I took to make it easier for me to do again, and for others to emulate...<br />
<br />
1. as in [http://www.maximintegrated.com/app-notes/index.mvp/id/203] and [ww.hobby-boards.com/store/pages/Wiring-Diagram.html], I connected the two left pins to the middle wires in a rj12 cable.<br />
2. I installed owfs by downloading and running configure && make & make install. this had some errors as long as I didn't have enough packages installed...so I installed them using apt-get install. <br />
sudo apt-get install libfuse-dev libusb php5 libfuse-dev php5-dev<br />
I added the command<br />
opt/owfs/bin/owfs -u /mnt/1-wire/ --allow-other <br />
to rc.local so that it is started up everytime I booted.<br />
3. At this point, I could already see the sensors: <br />
~$ ls /mnt/1-wire/<br />
28.06F625030000 81.7F9230000000 alarm bus.0 settings simultaneous statistics structure system uncached<br />
~$ ls /mnt/1-wire/28.06F625030000/<br />
address crc8 family id power r_id temperature temperature11 temperature9 templow<br />
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type<br />
~$ cat /mnt/1-wire/28.06F625030000/temperature<br />
-21.1875 <br />
Telling me that the current temperature (inside the freezer) is -21C<br />
4. For logging this data I downloaded thermd. to install it a few perl packages are needed so I installed them (again using apt-get). After editing the configuration file and putting it in its place ( /etc/thermd.conf ) making a directory for the datafiles (mkdir /var/log/thermd ) and copying the script to its place ( /usr/local/bin/thermd ) one can run it <br />
thermd -daemon<br />
5. For mailing me when alert conditions happen I installed sSMTP ( apt-get install ssmtp ) and configured it with the following configuration file:<br />
~$ cat /etc/ssmtp/ssmtp.conf <br />
mailhub=mail.farjoun.org:465<br />
UseTLS=YES # Secure connection (SSL/TLS)<br />
FromLineOverride=YES # Force the From: line<br />
Hostname=snowy.farjoun.org # The name of this host<br />
RewriteDomain=farjoun.org # The host the mail appears to be coming from<br />
Root=yossi # Redirect mail for root@ to postmaster@<br />
AuthUser=mySMTP User # Your DreamHost mail account<br />
AuthPass=mySMTP Password <br />
FromLineOverride=YES<br />
6. hostname<br />
7. sshd<br />
8. apache<br />
9. opening ports</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Main_PageMain Page2012-11-25T18:22:39Z<p>Yossi: /* Pet projects */</p>
<hr />
<div><h1><font color="red">Warning!!</font></h1><br />
This is an old and outdated wiebsite. for uptodate information about me, please visit [http://math.farjoun.org math.farjoun.org].<br />
====Yossi Farjoun====<br />
[[Image:Seven.JPG|right]]<br />
<br />
*Office: 2-334 <br />
*Mailing address: 77 Mass. ave., MIT 2-334, Cambridge MA 02139<br />
*Teaching: Introduction to Numerical Analysis (18.330) (Spring 2009)<br />
*Contact: yfarjoun (at) math (dot) mit (dot) edu ([[Public Key]]), office phone: (617) 253 7775<br />
*Website (this one!) [http://scripts.mit.edu/~yfarjoun/homepage/index.php http://scripts.mit.edu/~yfarjoun/homepage/index.php]<br />
<br />
====Mathematics====<br />
I am an Instructor (Post-Doc) at [http://www.mit.edu MIT's] [http://math.mit.edu Applied Mathematics Department]. I am currently in my third (and final) year and have started looking for jobs around the world (US, Canada, several places in Europe, and Israel.) <br />
<br />
My research involves the mathematical solution of physical and biological problems, especially when asymptotic methods can be employed. I've looked at problems involving [[shape optimization]], [[non-linear advection]], [[inhomogeneous diffusion]], [[numerical methods for conservation laws]], and, curiously, [[asymptotics of combinatorial objects]].<br />
<br />
You might be interested in reading my [http://math.mit.edu/~yfarjoun/Files/ResearchStatement.pdf Research Statement], [http://math.mit.edu/~yfarjoun/Files/TeachingStatement.pdf Teaching Statement], or [http://math.mit.edu/~yfarjoun/Files/Resume.pdf Resume].<br />
<br />
I tend to put my publications and preprints on the [http://arxiv.org arXiv], and that is a good place to look for [http://arxiv.org/find/all/1/au:+Farjoun_Y/0/1/0/all/0/1 them].<br />
<br />
I have a list of interview questions that I got from [http://www-math.mit.edu/~bush/ John Bush]. <br />
I used this list in my interview at Oxford, and found it to be quite useful, if you would like a copy please let me know. (Sorry, I was requested to remove it from cyberspace...)<br />
<br />
Want to see some [http://picasaweb.google.com/farjoun pictures]? (Mainly of my daughter Katya...)<br />
<br />
====Current Teaching: [[18.330 Numerical Analysis]]====<br />
<br />
====Past Teaching====<br />
*[[UC Berkeley]]<br />
<br />
*[[IAP Introduction to Matlab]]<br />
*[[18.330 Numerical Analysis (2008)]]<br />
<br />
====Rock Climbing====<br />
*[[The Nose]]<br />
*[[El Potrero Chico]]<br />
*[[Bugaboos]]<br />
*[[Shoe Resoling]]<br />
<br />
====Pet projects====<br />
*[[Recipes]]<br />
*[[Code Snippets]]<br />
*[[LaTeX stuff]]<br />
*[http://www.omath.org omath] An attempt with [http://www.tqft.net Scott Morrison] and others to write an open algebra system with similar syntax to Mathematica(TM). We didn't get very far...but it was fun.<br />
*[[House Sensors]]<br />
*[http://www.ocf.berkeley.edu/~yfarjoun/Bookly/Book_Renewal.html Bookly] UC Libraries do not allow patrons to renew all their books at one click. Nor do they allow for automatic renewal. This website provide this service for free.<br />
*[http://math.mit.edu/~yfarjoun/website/index.htm Alaska Road Trip] Rahel and I went on a long road trip in 2002.<br />
*My [[Book Library]]<br />
<br />
====Links====<br />
[http://arxiv.org arXiv]<br />
[http://www.wikipedia.org wikipedia]<br />
[http://home.mchsi.com/~taxcalculator/ Tax Calculator]<br />
[http://www.timeanddate.com/worldclock/personal.html World Clock]<br />
[http://www.jajah.com/members/? Jajah]<br />
[http://www.grymoire.com/Unix/Sed.html#uh-0 sed]<br />
[http://www.vectorsite.net/tsawk.html awk]<br />
<br />
<br />
====Friends' Websites====<br />
[http://www.rahelwachs.com Rahel Wachs]<br />
[http://tqft.net Scott Morrison]<br />
[http://nissan.hajaj.googlepages.com/nissanhajaj Nissan Hajaj]<br />
[http://www.math.ucla.edu/~schul/ Raanan Schul]<br />
[http://www.ocf.berkeley.edu/~njwhite/ Nina White]<br />
[http://www.timebridge.com TimeBridge] Yori Nelken's company<br />
[http://www.mit.edu/~jcnave/ JC (Jean-Christophe) Nave]<br />
[http://www-math.mit.edu/~seibold/ Benjamin Seibold]<br />
[http://www-math.mit.edu/~avshalom/ Avshlom Manela]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2012-05-30T22:00:02Z<p>Yossi: </p>
<hr />
<div><h2>awk</h2><br />
[[Code Snippets/awk]]<br />
<br />
[[Code Snippets/sed]]<br />
<br />
<h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. The program extracts every attachment it finds in the mbox file and plops it into the directory. Very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachements.py here], with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.<br />
<br />
<br />
<h2> Matlab quirks and work arounds</h2><br />
<br />
- when saving objects, careful when including pointers to functions. If these functions are nested functions or there are persistent variables around, the workspace will get saved as well (so that the functions can work...) even if the functions themselves do not need the variables.<br />
<br />
- Matlab is using multi-threaded execusion and so if you want to time your runs (to know how your algorithem scales, you must start matlab with the option -singleCompThread as discussed [http://www.mathworks.com/matlabcentral/answers/3153-matlab-with-dual-core-uses-only-50-cpu-r2010b-intel-core-2-duo-t9300 here].<br />
<br />
- When using Matlab with several screens, there is a strange java error that occurs when plotting. This can happen while editing a plot, or when plotting with sub-figures. At any rate, one workaround is to issue the command set(0,'DefaultFigureRenderer','OpenGL') as discussed [http://www.mathworks.es/matlabcentral/newsreader/view_thread/169024 here].</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2012-05-25T18:04:26Z<p>Yossi: </p>
<hr />
<div><h2>awk</h2><br />
[[Code Snippets/awk]]<br />
<br />
[[Code Snippets/sed]]<br />
<br />
<h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. The program extracts every attachment it finds in the mbox file and plops it into the directory. Very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachements.py here], with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.<br />
<br />
<br />
<h2> Matlab quirks and work arounds</h2><br />
<br />
- when saving objects, careful when including pointers to functions. If these functions are nested functions or there are persistent variables around, the workspace will get saved as well (so that the functions can work...) even if the functions themselves do not need the variables.<br />
<br />
- Matlab is using multi-threaded execusion and so if you want to time your runs (to know how your algorithem scales, you must start matlab with the option -singleCompThread as discussed [http://www.mathworks.com/matlabcentral/answers/3153-matlab-with-dual-core-uses-only-50-cpu-r2010b-intel-core-2-duo-t9300 here].</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=YogurtYogurt2011-12-30T17:53:44Z<p>Yossi: </p>
<hr />
<div><br />
This a simple recipe for making yogurt....out of yogurt and milk! I always start with bought yogurt that I like. its true, that you can use your home-made yogurt for your next batch, but I found that the quality degrades quickly over time.<br />
<br />
Total time: 13 hours<br />
<br />
Prep time: 15 minutes<br />
<br />
Ingredients:<br />
*1 quart milk<br />
*2 tbsp yogurt<br />
<br />
Heat the milk in a thick bottomed pot, covered on low heat. Heat to 80-90 C (~200F). This is not for pasteurizing the milk, but rather for the yogurt to develop well. Maintain temps above 80C for 20 minutes, but do not allow to reach a boil. <br />
<br />
Turn heat off and let cool until less than 50C. Skim off the skin if it formed. Transfer small amount of milk to clean sealable container and mix thoroughly with yogurt. Add remaining milk, close container, cover with a towel and and place in warm place (I put it inside oven, but in that case make sure you do not forget and turn on the oven for something else!)<br />
<br />
After about 10 hours, yogurt will have formed. Refrigerate and enjoy.<br />
<br />
Back to [[Recipes]]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=YogurtYogurt2011-12-30T17:53:02Z<p>Yossi: Created page with ' This a simple recipe for making yogurt....out of yogurt and milk! I always start with bought yogurt that I like. its true, that you can use your home-made yogurt for your next â€¦'</p>
<hr />
<div><br />
<br />
This a simple recipe for making yogurt....out of yogurt and milk! I always start with bought yogurt that I like. its true, that you can use your home-made yogurt for your next batch, but I found that the quality degrades quickly over time.<br />
<br />
Total time: 13 hours<br />
<br />
Prep time: 15 minutes<br />
<br />
Ingredients:<br />
*1 quart milk<br />
*2 tbsp yogurt<br />
<br />
Heat the milk in a thick bottomed pot, covered on low heat. Heat to 80-90 C (~200F). This is not for pasteurizing the milk, but rather for the yogurt to develop well. Maintain temps above 80C for 20 minutes, but do not allow to reach a boil. <br />
<br />
Turn heat off and let cool until less than 50C. Skim off the skin if it formed. Transfer small amount of milk to clean sealable container and mix thoroughly with yogurt. Add remaining milk, close container, cover with a towel and and place in warm place (I put it inside oven, but in that case make sure you do not forget and turn on the oven for something else!)<br />
<br />
After about 10 hours, yogurt will have formed. Refrigerate and enjoy.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=RecipesRecipes2011-12-30T17:44:33Z<p>Yossi: </p>
<hr />
<div>These are most of the dishes I know how to cook and enjoy cooking...I put them here mostly so that I don't need to lug my cook book around. If you make any of these dishes, please let me know how it went. Also, if you have any suggestions, changes, corrections etc, feel free to put them in, or add a comment at the end of the recipe. Cheers! <br />
<br />
====Main dishes====<br />
*(Margaret's) [[Hummus Pasta]]<br />
*(Margaret's) [[Majadra]]<br />
*(Margaret's) [[Granola]]<br />
*(Aliza's) [[Lasagna]]<br />
*[[Stuffed Vegetables]]<br />
*[[Aliza's Granola]]<br />
<br />
<br />
====Sauces====<br />
*[[Pesto Sauce]]<br />
*[[Bolognese]]<br />
*[[Yogurt]] (not a yogurt sauce...just yogurt)<br />
<br />
====Breads====<br />
*[[Bagels]]<br />
*[[Pita]]<br />
*(Aliza's) [[Sufganiot]] (Hannuka doughnuts)<br />
*[[Pie Crust]]<br />
*[[Challah]]<br />
*[[Barbari]]<br />
*[[No Knead Bread]] (Thanks to Mark Bitmann of the NYT)<br />
<br />
====Desserts====<br />
*[[Lemon Cookies]]<br />
*[[Banana Bread]]<br />
*(June's) [[Apple Crisp]]<br />
*[[Cocoa Butter Cookies]]<br />
*[[Mango Sticky Rice]]<br />
*[[Cinnamon Sticky Rice]]<br />
*[[Chocolate Truffles]]<br />
*[[Blueberry Scones]]<br />
*[[Maple Walnut Scones]]<br />
*(Aliza's) [[Brownies]]<br />
*(Iza's) [[Yeast Cake]]<br />
<br />
====Salads====<br />
*(Margaret's) [[Salsa]]<br />
*[[Babaganoosh]] (eggplant salad)<br />
*[[Roasted Bell Peppers]]<br />
*[[Labaneh]]<br />
*[[Hummus]]<br />
*[[Pasta Salad]]<br />
<br />
Friends' recipe sites:<br />
<br />
[http://math.berkeley.edu/~scott/wiki/index.php/Recipes Scott]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=No_Knead_BreadNo Knead Bread2011-12-30T17:43:05Z<p>Yossi: </p>
<hr />
<div>Makes 1 loaf. <br />
<br />
Total time: 15 hours.<br />
<br />
Preparation time: 10 minutes<br />
<br />
Ingredients:<br />
*3 cups flour (white, whole wheat or a mixure)<br />
*1.5+ cups water<br />
*1/4 tsp dry active yeast (really!!)<br />
*1 tsp salt<br />
<br />
Do not heat oven yet.<br />
Mix dry ingredients in a bowl, add the water by the 1/2 cupful, mixing with a wooden spoon.<br />
dough should all stick together and form a slightly shaggy ball of dough. no need to knead it, but make sure there is no dry flour in the bowl. add a little water if needed.<br />
cover in bowl, and leave to rise overnight, or 12 hours in a warm part of the kitchen. Dough should have roughly doubled in size, if it didn't rise enough (after 12 hours), knead a few times (sorry Bittman) and return to bowl for another few hours. <br />
<br />
Deflate the dough and gently form a nice ball, try not to tear the dough too much while you do so. Dough should be smooth and slightly sticky. <br />
Place on a well floured surface and cover with a towel for 1 hour. <br />
Place a oven safe pot (preferably thick cast-iron) in the oven and pre-heat the oven to 450F.<br />
Once oven is hot, decorate the loaf with a few slits on the top (I do a cross-hatch pattern) and place gently (and carefully) in the pot, cover. Bread will not stick to hot pot, but it will stick horribly to a cold one.<br />
Lower the temperature to 425 and bake for 45 minutes. Loaf should be crusty brown and sound hollow when tapped on the bottom. Let cool for 20 minutes before devouring.<br />
<br />
To double, double the recipe, make two loaves and bake in two pots.<br />
<br />
Back to [[Recipes]]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=ChallahChallah2011-12-30T17:42:35Z<p>Yossi: </p>
<hr />
<div>(hallah?)<br />
<br />
Ingredients:<br />
<br />
* 2 1/2 cups warm water (110 degrees F/45 degrees C) (replace one cup with milk?)<br />
* 1 tablespoon active dry yeast<br />
* 1/2 cup honey (replace some with sugar? I've been using less...1/3 of a cup--[[User:Yossi|Yossi]] 17:42, 30 December 2011 (UTC))<br />
* 4 tablespoons vegetable oil (replace with melted butter?)<br />
* 3 eggs<br />
* 1 tablespoon salt<br />
* 8 cups unbleached all-purpose flour<br />
* (optional) seeds (poppy, sesame, sunflower, pumpkin)<br />
<br />
Directions:<br />
* In a large bowl, sprinkle yeast over barely warm water. Beat in honey, oil, 2 eggs, and salt. Add the flour one cup at a time, beating after each addition, graduating to kneading with hands as dough thickens. Knead until smooth and elastic and no longer sticky, adding flour as needed. Cover with a damp clean cloth and let rise for 1 1/2 hours or until dough has doubled in bulk.<br />
* Punch down the risen dough and turn out onto floured board. Divide in half and knead each half for five minutes or so, adding flour as needed to keep from getting sticky. Divide each half into thirds and roll into long snake about 1 1/2 inches in diameter. Pinch the ends of the three snakes together firmly and braid from middle. Either leave as braid or form into a round braided loaf by bringing ends together, curving braid into a circle, pinch ends together. Grease two baking trays and place finished braid or round on each. Cover with towel and let rise about one hour.<br />
* Preheat oven to 375 degrees F (190 degrees C).<br />
* Beat the remaining egg and brush a generous amount over each braid. Sprinkle with poppy seeds if desired.<br />
* Bake at 375 degrees F (190 degrees C) for about 40 minutes. Bread should have a nice hollow sound when thumped on the bottom. Cool on a rack for at least one hour before slicing.<br />
<br />
Back to [[Recipes]]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=No_Knead_BreadNo Knead Bread2011-12-30T17:40:26Z<p>Yossi: </p>
<hr />
<div><br />
Makes 1 loaf. <br />
<br />
Total time: 15 hours.<br />
<br />
Preparation time: 10 minutes<br />
<br />
Ingredients:<br />
*3 cups flour (white, whole wheat or a mixure)<br />
*1.5+ cups water<br />
*1/4 tsp dry active yeast (really!!)<br />
*1 tsp salt<br />
<br />
Do not heat oven yet.<br />
Mix dry ingredients in a bowl, add the water by the 1/2 cupful, mixing with a wooden spoon.<br />
dough should all stick together and form a slightly shaggy ball of dough. no need to knead it, but make sure there is no dry flour in the bowl. add a little water if needed.<br />
cover in bowl, and leave to rise overnight, or 12 hours in a warm part of the kitchen. Dough should have roughly doubled in size, if it didn't rise enough (after 12 hours), knead a few times (sorry Bittman) and return to bowl for another few hours. <br />
<br />
Deflate the dough and gently form a nice ball, try not to tear the dough too much while you do so. Dough should be smooth and slightly sticky. <br />
Place on a well floured surface and cover with a towel for 1 hour. <br />
Place a oven safe pot (preferably thick cast-iron) in the oven and pre-heat the oven to 450F.<br />
Once oven is hot, decorate the loaf with a few slits on the top (I do a cross-hatch pattern) and place gently (and carefully) in the pot, cover. Bread will not stick to hot pot, but it will stick horribly to a cold one.<br />
Lower the temperature to 425 and bake for 45 minutes. Loaf should be crusty brown and sound hollow when tapped on the bottom. Let cool for 20 minutes before devouring.<br />
<br />
To double, double the recipe, make two loaves and bake in two pots.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=No_Knead_BreadNo Knead Bread2011-12-30T17:39:10Z<p>Yossi: Created page with ' makes 1 loaf. Total time: 15 hours. Preparation time: 10 minutes Recipe can be doubled. *3 cups flour (white, whole wheat or a mixure) *1.5+ cups water *1/4 tsp dry active yeâ€¦'</p>
<hr />
<div><br />
<br />
makes 1 loaf. <br />
Total time: 15 hours.<br />
Preparation time: 10 minutes<br />
Recipe can be doubled.<br />
<br />
*3 cups flour (white, whole wheat or a mixure)<br />
*1.5+ cups water<br />
*1/4 tsp dry active yeast (really!!)<br />
*1 tsp salt<br />
<br />
Do not heat oven yet.<br />
<br />
Mix dry ingredients in a bowl, add the water by the 1/2 cupful, mixing with a wooden spoon.<br />
dough should all stick together and form a slightly shaggy ball of dough. no need to knead it, but make sure there is no dry flour in the bowl. add a little water if needed.<br />
cover in bowl, and leave to rise overnight, or 12 hours in a warm part of the kitchen. Dough should have roughly doubled in size, if it didn't rise enough (after 12 hours), knead a few times (sorry Bittman) and return to bowl for another few hours. <br />
<br />
Deflate the dough and gently form a nice ball, try not to tear the dough too much while you do so. Dough should be smooth and slightly sticky. <br />
<br />
Place on a well floured surface and cover with a towel for 1 hour. <br />
Place a oven safe pot (preferably thick cast-iron) in the oven and pre-heat the oven to 450F.<br />
Once oven is hot, decorate the loaf with a few slits on the top (I do a cross-hatch pattern) and place gently (and carefully) in the pot, cover. Bread will not stick to hot pot, but it will stick horribly to a cold one.<br />
Lower the temperature to 425 and bake for 45 minutes. Loaf should be crusty brown and sound hollow when tapped on the bottom. Let cool for 20 minutes before devouring.<br />
<br />
To double, double the recipe, make two loaves and bake in two pots.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=SufganiotSufganiot2011-12-30T17:22:26Z<p>Yossi: </p>
<hr />
<div>Ingredients:<br />
<br />
*8 oz (250 gr) creme fraiche (white cheese)<br />
*3 1/2 cups flour<br />
*4 Heaping tbs baking powder (last time I used 4 tsp and it was fine....--[[User:Yossi|Yossi]] 17:22, 30 December 2011 (UTC))<br />
*2 (small) eggs<br />
*4 tbs sugar<br />
*8 oz (250 gr) sour cream (or yogurt)<br />
*1 bottle of vegetable oil<br />
*your favorite jam (strawberry jam is recommended)<br />
*confectioners (powdered) sugar.<br />
<br />
Directions:<br />
*Put the oil in a deep pot and heat. Don't let the oil get too hot<br />
*Mix all cheese, flour, baking powder, eggs, sugar and sour cream in a bowl until smooth.<br />
*Keeping the oil hot, but not too hot, add spoonfuls of the batter to the oil, try to keep the batter from having spikes...<br />
*Batter will bubble and eventually brown, if the balls don't turn over on their own accord, give them a nudge<br />
*Remove and place on paper towels when browned. If oil is too hot, the batter will be uncooked in the center of the balls....<br />
*With a spoon or large syringe, introduce about half a spoon of jam into the balls. <br />
*Sprinkle with powdered sugar, and serve. Best when eaten fresh and warm.<br />
<br />
Enjoy!<br />
<br />
Back to [[Recipes]]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=HummusHummus2011-05-09T22:50:49Z<p>Yossi: </p>
<hr />
<div>Ingredients:<br />
*1 cup dried garbanzo beans<br />
*1/2 tsp salt<br />
*1/8 tsp cumin<br />
*1 small garlic clove<br />
*1 tbsp lemon juice<br />
*3 heaping tbsp tahini paste (hopefully, El'Jamal but I haven't seen it out of Israel)<br />
*3 tbsp olive oil<br />
*1/4 tsp baking soda<br />
<br />
Directions:<br />
<br />
*Soak the garbanzo beans in a large pot. Leave overnight.<br />
*Wash and drain the beans, cover them with water and then some, add the 1/4 tsp baking soda. Bring pot to a boil, simmer for several hours, until soft. <br />
*Drain beans <b>RETAINING THE WATER</b>. Let cool a little.<br />
*Put beans in a food processor, process. <br />
*Add rest of ingredients and a little bit of the retained water (precise amount depends on the length of simmering) and process. <br />
*Additional water (from the retained stuff) can be added to reach desired consistency. Note: hummus thickens up when it cools. <br />
<br />
Serving suggestion:<br />
Place generous amount on a flat plate. With back of large spoon form a crater in the middle of the plate. Pour generous amounts of olive <br />
oil into crater. Garnish with chopped parsley and paprika. Serve alongside fresh vegetables (tomato, cucumber, peppers) and hot pita.<br />
<br />
<br />
<br />
Back to [[Recipes]]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Main_PageMain Page2010-11-08T11:25:33Z<p>Yossi: /* Yossi Farjoun */</p>
<hr />
<div><h1><font color="red">Warning!!</font></h1><br />
This is an old and outdated wiebsite. for uptodate information about me, please visit [http://math.farjoun.org math.farjoun.org].<br />
====Yossi Farjoun====<br />
[[Image:Seven.JPG|right]]<br />
<br />
*Office: 2-334 <br />
*Mailing address: 77 Mass. ave., MIT 2-334, Cambridge MA 02139<br />
*Teaching: Introduction to Numerical Analysis (18.330) (Spring 2009)<br />
*Contact: yfarjoun (at) math (dot) mit (dot) edu ([[Public Key]]), office phone: (617) 253 7775<br />
*Website (this one!) [http://scripts.mit.edu/~yfarjoun/homepage/index.php http://scripts.mit.edu/~yfarjoun/homepage/index.php]<br />
<br />
====Mathematics====<br />
I am an Instructor (Post-Doc) at [http://www.mit.edu MIT's] [http://math.mit.edu Applied Mathematics Department]. I am currently in my third (and final) year and have started looking for jobs around the world (US, Canada, several places in Europe, and Israel.) <br />
<br />
My research involves the mathematical solution of physical and biological problems, especially when asymptotic methods can be employed. I've looked at problems involving [[shape optimization]], [[non-linear advection]], [[inhomogeneous diffusion]], [[numerical methods for conservation laws]], and, curiously, [[asymptotics of combinatorial objects]].<br />
<br />
You might be interested in reading my [http://math.mit.edu/~yfarjoun/Files/ResearchStatement.pdf Research Statement], [http://math.mit.edu/~yfarjoun/Files/TeachingStatement.pdf Teaching Statement], or [http://math.mit.edu/~yfarjoun/Files/Resume.pdf Resume].<br />
<br />
I tend to put my publications and preprints on the [http://arxiv.org arXiv], and that is a good place to look for [http://arxiv.org/find/all/1/au:+Farjoun_Y/0/1/0/all/0/1 them].<br />
<br />
I have a list of interview questions that I got from [http://www-math.mit.edu/~bush/ John Bush]. <br />
I used this list in my interview at Oxford, and found it to be quite useful, if you would like a copy please let me know. (Sorry, I was requested to remove it from cyberspace...)<br />
<br />
Want to see some [http://picasaweb.google.com/farjoun pictures]? (Mainly of my daughter Katya...)<br />
<br />
====Current Teaching: [[18.330 Numerical Analysis]]====<br />
<br />
====Past Teaching====<br />
*[[UC Berkeley]]<br />
<br />
*[[IAP Introduction to Matlab]]<br />
*[[18.330 Numerical Analysis (2008)]]<br />
<br />
====Rock Climbing====<br />
*[[The Nose]]<br />
*[[El Potrero Chico]]<br />
*[[Bugaboos]]<br />
*[[Shoe Resoling]]<br />
<br />
====Pet projects====<br />
*[[Recipes]]<br />
*[[Code Snippets]]<br />
*[[LaTeX stuff]]<br />
*[http://www.omath.org omath] An attempt with [http://www.tqft.net Scott Morrison] and others to write an open algebra system with similar syntax to Mathematica(TM). We didn't get very far...but it was fun.<br />
*[http://www.ocf.berkeley.edu/~yfarjoun/Bookly/Book_Renewal.html Bookly] UC Libraries do not allow patrons to renew all their books at one click. Nor do they allow for automatic renewal. This website provide this service for free.<br />
*[http://math.mit.edu/~yfarjoun/website/index.htm Alaska Road Trip] Rahel and I went on a long road trip in 2002.<br />
*My [[Book Library]]<br />
<br />
====Links====<br />
[http://arxiv.org arXiv]<br />
[http://www.wikipedia.org wikipedia]<br />
[http://home.mchsi.com/~taxcalculator/ Tax Calculator]<br />
[http://www.timeanddate.com/worldclock/personal.html World Clock]<br />
[http://www.jajah.com/members/? Jajah]<br />
[http://www.grymoire.com/Unix/Sed.html#uh-0 sed]<br />
[http://www.vectorsite.net/tsawk.html awk]<br />
<br />
<br />
====Friends' Websites====<br />
[http://www.rahelwachs.com Rahel Wachs]<br />
[http://tqft.net Scott Morrison]<br />
[http://nissan.hajaj.googlepages.com/nissanhajaj Nissan Hajaj]<br />
[http://www.math.ucla.edu/~schul/ Raanan Schul]<br />
[http://www.ocf.berkeley.edu/~njwhite/ Nina White]<br />
[http://www.timebridge.com TimeBridge] Yori Nelken's company<br />
[http://www.mit.edu/~jcnave/ JC (Jean-Christophe) Nave]<br />
[http://www-math.mit.edu/~seibold/ Benjamin Seibold]<br />
[http://www-math.mit.edu/~avshalom/ Avshlom Manela]</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2010-06-11T13:44:11Z<p>Yossi: </p>
<hr />
<div><h2>awk</h2><br />
[[Code Snippets/awk]]<br />
<br />
[[Code Snippets/sed]]<br />
<br />
<h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. The program extracts every attachment it finds in the mbox file and plops it into the directory. Very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachements.py here], with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_Snippets/sedCode Snippets/sed2010-06-11T13:43:00Z<p>Yossi: </p>
<hr />
<div><h2>To change a latex file from having (\ref{eq:blah}) to \eqref{eq:blah} (note the use of eq: in the label!)</h2><br />
<br />
sed -e "s/(\\\\ref{\(eq:[^}]*\)})/\\\\eqref{\1}/g" < FarjounShaeffer.tex > text.tex<br />
<br />
<br />
<h2>Mass rename using sed</h2><br />
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_Snippets/sedCode Snippets/sed2010-06-11T13:41:51Z<p>Yossi: Created page with ' To change a latex file from having (\ref{eq:blah}) to \eqref{eq:blah} (note the use of eq: in the label!) sed -e "s/(\\\\ref{\(eq:[^}]*\)})/\\\\eqref{\1}/g" < FarjounShaefâ€¦'</p>
<hr />
<div><br />
To change a latex file from having (\ref{eq:blah}) to \eqref{eq:blah} (note the use of eq: in the label!)<br />
<br />
sed -e "s/(\\\\ref{\(eq:[^}]*\)})/\\\\eqref{\1}/g" < FarjounShaeffer.tex > text.tex<br />
<br />
----</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2010-06-11T13:40:18Z<p>Yossi: </p>
<hr />
<div><h2>awk</h2><br />
[[Code Snippets/awk]]<br />
<br />
[[Code Snippets/sed]]<br />
<br />
<h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. The program extracts every attachment it finds in the mbox file and plops it into the directory. Very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachements.py here], with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Mass rename using sed</h2><br />
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2010-02-02T12:20:08Z<p>Yossi: </p>
<hr />
<div><font color=red> THIS PAGE IS OLD I AM NOT TEACHING THIS COURSE IN 2010!!</font color>Feel free to use the information given here.<br />
===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
|- <br />
|May&nbsp;18<br />
|'''Final&nbsp;2'''<br />
|Here's a final review of questions of the type that are not in the mid-terms and quizzes: [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/final_review.pdf final review]. I will not provide solutions. Expect 6 questions covering all of the material of the course, but more focused on the last part. Richardson Extrapolation, Trapezoidal and Simpson's rules, linear ODE's, numerical methods (Truncation Errors, stability of multi-step methods), Analysis of numerical methods for solving PDE (convergance and stability). The question on PDE from the review will be given verbatim in the final.<br />
|-<br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2010-02-02T12:15:58Z<p>Yossi: /* General */</p>
<hr />
<div><h1 font color=red> hello </h1><br />
===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
|- <br />
|May&nbsp;18<br />
|'''Final&nbsp;2'''<br />
|Here's a final review of questions of the type that are not in the mid-terms and quizzes: [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/final_review.pdf final review]. I will not provide solutions. Expect 6 questions covering all of the material of the course, but more focused on the last part. Richardson Extrapolation, Trapezoidal and Simpson's rules, linear ODE's, numerical methods (Truncation Errors, stability of multi-step methods), Analysis of numerical methods for solving PDE (convergance and stability). The question on PDE from the review will be given verbatim in the final.<br />
|-<br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2009-12-14T10:34:39Z<p>Yossi: </p>
<hr />
<div><h2>awk</h2><br />
[[Code Snippets/awk]]<br />
<br />
<br />
<h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. The program extracts every attachment it finds in the mbox file and plops it into the directory. Very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachements.py here], with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Mass rename using sed</h2><br />
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_Snippets/awkCode Snippets/awk2009-12-14T10:33:49Z<p>Yossi: Created page with ' <big> Useful snippets of code using awk</big> svn st | awk '/^\?/ {print $2}' Finds those files that are unknown to svn and prints out their names. You can then pipe this ouâ€¦'</p>
<hr />
<div><br />
<big> Useful snippets of code using awk</big><br />
<br />
svn st | awk '/^\?/ {print $2}'<br />
<br />
Finds those files that are unknown to svn and prints out their names. You can then pipe this output to add them to svn...</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2009-05-29T21:27:42Z<p>Yossi: </p>
<hr />
<div><h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. The program extracts every attachment it finds in the mbox file and plops it into the directory. Very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachements.py here], with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Mass rename using sed</h2><br />
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2009-05-29T21:25:33Z<p>Yossi: </p>
<hr />
<div><h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. it extracts every attachment it finds in the mbox file and plops it into the directory. very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it [http://math.mit.edu/~yfarjoun/Files/dump_attachments.py] here, with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Mass rename using sed</h2><br />
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=Code_SnippetsCode Snippets2009-05-29T21:16:47Z<p>Yossi: </p>
<hr />
<div><h2> Extracting attachments from an email file/directory </h2><br />
My problem:<br />
I scanned many of my paper files using a scanner that emails me the resulting pdf. As a result I have many (many!) emails each with a <br />
pdf file attached. I wanted to extract all these attachments without doing so manually. <br />
<br />
My Specifics: <br />
I use pine (so? shoot me!). so I can easily move all the email messages that I'm interested in extracting their attachments into one big "folder". <br />
This "folder" is actually one big computer file in a format called [http://en.wikipedia.org/wiki/Mbox mbox] (among many other names).<br />
<br />
My solution: I wrote a python program (well, slightly modified one I found [http://docs.python.org/library/email-examples.html here]). The program takes as input a directory name and a file name. it extracts every attachment it finds in the mbox file and plops it into the directory. very little error checking is done. If there are two attachments with the same given filename the second will over-write the first. I'm giving it here, with the regular caveats: '''It works for me. Your mileage may vary.'''<br />
<br />
<br />
<h2> make a movie using mencoder</h2><br />
mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc xvid -xvidencopts pass=1:bitrate=250 -oac copy -o fig_art_geometry.avi<br />
<br />
<h2>Tunneling through a firewall using ssh</h2><br />
<br />
tunnelling:<br />
<br />
tunnel SSH port through lagrange to mathstation184<br />
<br />
ssh -L8022:mathstation184:22 lagrange.mit.edu<br />
<br />
now you have a port on your local machine 8022, that is hooked up to port 22<br />
on mathstation184, so....<br />
<br />
ssh -p 8022 localhost<br />
<br />
if you wanted to rsync:<br />
<br />
rsync -cav -e 'ssh -p 8022 localhost' localfiles localhost:remotefiles<br />
<br />
<h2>Mass rename using sed</h2><br />
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;<br />
<br />
<h2>Merging 2 pdf files</h2><br />
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf ...<br />
<br />
<h2>To print out a gif file with name as an annotation</h2><br />
<br />
f=<filename> convert -draw "text 10,20 ${f%%.gif}" $f -| lpr<br />
<br />
thus, as a loop (in bash) you'd have <br />
<br />
for f in *.gif; <br />
do convert -draw "text 10,20 ${f%%.gif}" $f -| lpr; <br />
done;<br />
<br />
To do it for all gif files in directory<br />
<br />
<h2>killall for solaris</h2><br />
killall is a nice command that is included in BSD. Solaris however doesn't always have it...here's a script that will emulate it:<br />
<br />
#!/bin/sh<br />
ps -a -o pid,fname | (read blah; while read pid name ; do <br />
if [ ${name} = ${1} ] ; then<br />
kill ${pid}<br />
fi<br />
done)<br />
<br />
To use, simply type<br />
% killall process-name-to-kill<br />
<br />
and the script will attempt to kill all processes with that name. if you have no permission to do so, it will give an error.<br />
<br />
----<br />
<h2>UC Berkeley Airbears login</h2><br />
To login to the berkeley Airbears network without going through the gateway page (you will still an account and password) use the following script:<br />
<br />
#!/usr/bin/perl -w<br />
use strict;<br />
$|++;<br />
<br />
use File::Basename;<br />
use WWW::Mechanize 0.72;<br />
<br />
my $mech = WWW::Mechanize->new( );<br />
<br />
$mech->get( "https://wireless-gw1.berkeley.edu/logon" );<br />
$mech->success() or die "Couldn't connect to wireless login page",<br />
$mech->response->status_line;<br />
<br />
# Select the form, fill the fields, and submit<br />
<br />
$mech->form_name( "logonForm" );<br />
<br />
$mech->set_visible([text=>"your-login-here"],[password=>"your-password-here"]);<br />
<br />
$mech->click("logon_action");<br />
$mech->success or die "Wireless login didn't seem to work.:,<br />
$mech->response->status_line;<br />
<br />
print "Logged onto Airbears.\n";<br />
<br />
The script needs various libraries of perl, so make sure that you have them. Also make sure that you change the login and password to the correct values. <br />
<br />
----<br />
<br />
<h2>Using rsync to get a snapshot of my account at Berkeley</h2><br />
<br />
I use the following command locally, to get a current snapshot of my home directory at Berkeley copied to a directory on my laptop:<br />
<br />
% rsync avuzb --exclude '*~' --exclude '.*' yfarjoun@login.math.berkeley.edu:. yossi/mathhome/<br />
<br />
Clearly, to use you need to replace the source and targets. Also, change the exclude directives if you prefer something else.<br />
<br />
----<br />
<br />
<h2> Roman numeral to Arabic decoder</h2><br />
<br />
This little Python script changes a Roman Numeral to a regular (arabic) number. It is quite robust, and will not check for errors in the input. It will also work "correctly" on mistakes such as iix (=8) and vl (=45) and such. It ignores characters that aren't in the list of 'ivxlcdm', they are considered 'whitespace' and the result is the sum of the different numbers in the input string. So that both 'i x' and 'iqx' translate to 11, (though clearly 'ix' translates to 9).<br />
<br />
#!/opt/local/bin/python<br />
<br />
<br />
value={'i':1,<br />
'v':5,<br />
'x':10,<br />
'l':50,<br />
'c':100,<br />
'd':500,<br />
'm':1000};<br />
<br />
equiv={'iv':'IIII',<br />
'ix':'VIIII',<br />
'xl':'XXXX',<br />
'xc':'LXXXX',<br />
'cd':'CCCC',<br />
'cm':'DCCCC',<br />
'iix&':'VIII',<br />
'xxc':'LXXX',<br />
'ccm':'DCCC',<br />
'vl':'XXXXV',<br />
'ld':'CCCCL'};<br />
<br />
<br />
def convert(roman):<br />
roman = roman.lower();<br />
for key in equiv.keys():<br />
# This little trick with the upper case is to avoid<br />
# double substitution as in ivx -> iiiix -> iiiviiii (which is wrong!)<br />
<br />
roman = roman.replace(key,equiv[key]);<br />
<br />
roman = roman.lower();<br />
sum = 0;<br />
for key in value.keys():<br />
sum+=roman.count(key)*value[key];<br />
<br />
return sum;<br />
<br />
<br />
#if called from command line, use argv to find the string<br />
#to convert and convert it. <br />
<br />
if __name__=='__main__':<br />
<br />
import sys<br />
print convert(sys.argv[1]);<br />
<br />
-----<br />
<h2>Cute</h2><br />
econd month i second month i second month i second month i second month i second mo<br />
using face her using face her using face her using face her using face her using fa<br />
then stop tart then stop tart the stop start the stop start the stop start the stop<br />
it at wasting pit at wasting pit a wasting spit a wasting spit a wasting spit a was<br />
an hast your lean hast your lean has your clean has your clean has your clean has y<br />
lead cars time lead cars time lead car time plead car time plead car time plead car<br />
man and heat a man and heat a man and heat a ma and wheat a ma and wheat a ma and w<br />
use over frogs use over frogs use over frogs use over frog use hover frog use hover<br />
n a pore old and a pore old and a pore old and a pore old an a spore old an a spore<br />
rm wiki rink farm wiki rink farm wiki rink farm wiki rink far wiki drink far wiki d<br />
server my date server my date server my date server my date server my date server m<br />
back ever fort back ever fort back ever fort back ever fort back ever fort back eve<br />
this filler is this filler is this filler is this filler is this filler is this fil<br />
<br />
<br />
(based on a stereogram design by Ray Butterworth)<br />
<br />
<br />
<h2>Getting inline equations in Latex to look better</h2><br />
<br />
So that equation snippets don't get stretched together with the rest of your text in a latex<br />
document, you should surround it with a \mbox{ }. to do this automagically do a regexp replace<br />
(in emacs or whatever) replacing \(\$.*?\$\) with \\mbox{\1} <br />
if you already have some \mbox'es and want to avoid \mbox{\mbox{ }} you should use a more sophisticated <br />
regexp, but emacs doesn't allow lookahead and stuff. so I'm not sure how to do this.</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-13T14:59:05Z<p>Yossi: /* Exams Scheduled */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
|- <br />
|May&nbsp;18<br />
|'''Final&nbsp;2'''<br />
|Here's a final review of questions of the type that are not in the mid-terms and quizzes: [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/final_review.pdf final review]. I will not provide solutions. Expect 6 questions covering all of the material of the course, but more focused on the last part. Richardson Extrapolation, Trapezoidal and Simpson's rules, linear ODE's, numerical methods (Truncation Errors, stability of multi-step methods), Analysis of numerical methods for solving PDE (convergance and stability). The question on PDE from the review will be given verbatim in the final.<br />
|-<br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-13T14:58:44Z<p>Yossi: /* Exams Scheduled */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
|- <br />
|May&nbsp;18<br />
|'''Final&nbsp;2'''<br />
|Here's a final review of questions of the type that are not in the mid-terms and quizzes: [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/HomeWork/final_review.pdf final review]. I will not provide solutions. Expect 6 questions covering all of the material of the course, but more focused on the last part. Richardson Extrapolation, Trapezoidal and Simpson's rules, linear ODE's, numerical methods (Truncation Errors, stability of multi-step methods), Analysis of numerical methods for solving PDE (convergance and stability). The question on PDE from the review will be given verbatim in the final.<br />
|-<br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-13T14:57:34Z<p>Yossi: /* Exams Scheduled */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
|- <br />
|May&nbsp;18<br />
|'''Final&nbsp;2'''<br />
|Here's a final review of questions of the type that are not in the mid-terms and quizzes: [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/final_review.pdf final review]. I will not provide solutions. Expect 6 questions covering all of the material of the course, but more focused on the last part. Richardson Extrapolation, Trapezoidal and Simpson's rules, linear ODE's, numerical methods (Truncation Errors, stability of multi-step methods), Analysis of numerical methods for solving PDE (convergance and stability). The question on PDE from the review will be given verbatim in the final.<br />
|-<br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-13T14:57:07Z<p>Yossi: /* Exams Scheduled */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|May&nbsp;18<br />
|'''Final&nbsp;2'''<br />
|Here's a final review of questions of the type that are not in the mid-terms and quizzes: [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/final_review.pdf final review]. I will not provide solutions. Expect 6 questions covering all of the material of the course, but more focused on the last part. Richardson Extrapolation, Trapezoidal and Simpson's rules, linear ODE's, numerical methods (Truncation Errors, stability of multi-step methods), Analysis of numerical methods for solving PDE (convergance and stability). The question on PDE from the review will be given verbatim in the final.<br />
|-<br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-07T20:39:13Z<p>Yossi: /* Written Homework given */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-07T20:39:01Z<p>Yossi: /* Programing Assignments */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Thursday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Friday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-05T14:50:24Z<p>Yossi: /* Programing Assignments */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Thursday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-05T14:49:36Z<p>Yossi: /* Written Homework given */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Thursday May 8<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-05-05T14:49:16Z<p>Yossi: /* Written Homework given */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit'''<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-04-30T20:30:32Z<p>Yossi: /* Written Homework given */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit''' (also isn't written yet!)<br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-04-30T19:12:02Z<p>Yossi: /* Written Homework given */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
||Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework9.pdf Homework 9 Differential Equations] '''Extra credit''' (also isn't written yet!)<br />
|-<br />
}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-04-30T19:11:06Z<p>Yossi: /* Programing Assignments */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6] '''Extra credit''' Not required. <br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossihttp://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis18.330 Numerical Analysis2009-04-30T14:57:19Z<p>Yossi: /* Programing Assignments */</p>
<hr />
<div>===General===<br />
{|<br />
|Instructor<br />
| Yossi Farjoun, yfarjoun@math.mit.edu<br />
|-<br />
|Grader <br />
| Stav Braun, sbraun@mit.edu<br />
|-<br />
|Prerequisites<br />
|18.03 or 18.034<br />
|-<br />
|Textbook<br />
|Numerical Analysis, Burden and Faires '''however''', it is not required. Do not feel obliged to buy this book.<br />
|-<br />
|Reader<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/reader.pdf This reader] is a work-in-progress reader, please let me know of any typos/corrections etc.<br />
|-<br />
|Location<br />
|TR 11-12:30 in 2-135<br />
|-<br />
|Office hours<br />
|2-334 Tuesdays 4-5pm (but will go on longer for those who came on time and need more time)<br />
|-<br />
|Phone (office) <br />
|(617) 253 7775<br />
|-<br />
|Website (this one!)<br />
|http://scripts.mit.edu/~yfarjoun/homepage/index.php?title=18.330_Numerical_Analysis<br />
|}<br />
<br />
===Grades===<br />
The course will have written assignments, programming assignments, quizzes, mid-terms and a final. The grade will be determined by averaging:<br />
<br />
*10% Quizzes (about 5 throughout the semester) <br />
*10% Written H/W (about 10 total) '''No late submissions''', grade is based on best 70%<br />
*25% Programming H/W (about 6 total) '''Must''' submit all but 1 to '''pass''' course<br />
*15% Each of 2 midterms <br />
*25% Final<br />
<br />
===Syllabus===<br />
*Calculus Review<br />
*Iterative solutions of algebraic equations<br />
**Chord method<br />
**Secant method<br />
**Newton's method<br />
*Enough Linear Algebra for our needs<br />
**Solution of triangular systems<br />
**LU decomposition of tridiagonal matrices<br />
*Solution of non-linear ODE <br />
*Numerical Interpolation<br />
**Polynomial<br />
**Spline<br />
*Numerical Integration<br />
**Trapezoidal Rule<br />
**Simpson's Method<br />
*Numerical Solutions to PDE (Introduction)<br />
<br />
===Course Progress===<br />
{|<br />
|2.3.2009 <br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter1.pdf Calculus review]. Continuous functions, Differential functions<br />
|-<br />
|2.5.2009 <br />
|More Calculus review. We talked about derivatives and integrals, Mean Value Theorem: Fundamental Theorem of Calculus. Integration by Parts. Substitution. <br />
|-<br />
|2.10.2009<br />
|Calculus Review: Taylor series, <math>O(h)</math> notation. Examples.<br />
|-<br />
|2.12.2009<br />
|One last Example for calculus review. Start [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter2.pdf Fixed Point Methods]<br />
|-<br />
|2.17.2009<br />
|Tuesday is a Monday! see you Thursday (Office hours are held today...)<br />
|-<br />
|2.19.2009<br />
|Higher-order iteration. Root finding methods.<br />
|-<br />
|2.24.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter3.pdf Tridiagonal linear systems], Example, <math>O(n)</math> solution, use of high dimension Newton's method.<br />
|-<br />
|2.26.2009<br />
|Quiz 1, [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter4.pdf Polynomial Interpolation], Existence and Uniqueness, Lagrange Form, Newton Form, Divided Differences (just a taste)<br />
|-<br />
|3.5.2009<br />
|More about divided differences, Mid-Term review. <br />
|-<br />
|3.10.2009<br />
|Mid-Term I Happened.<br />
|-<br />
|3.12.2009<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter5.pdf Splines], a Derivation using functional derivatives.<br />
|-<br />
|3.17.2009 <br />
|Returned midterm. Example using splines. Started discussion on [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Reader/Chapter6.pdf Inner Product Spaces].<br />
|-<br />
|3.19.2009<br />
|Continue inner product spaces. <br />
|-<br />
|3.31.2009<br />
|Orthogonal Functions<br />
|-<br />
|4.2.2008<br />
|Finish Orthogonal functions and start integration. (planned)<br />
|}<br />
<br />
===Written Homework given===<br />
{|<br />
|Due Thursday Feb 12<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1a.pdf Homework 1(a)]<br />
|-<br />
|Due Thursday Feb 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework1b.pdf Homework 1(b)]<br />
|-<br />
|Due Thursday Feb 26<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework2.pdf Homework 2 Fixed points and root finding]<br />
|-<br />
|Due Thursday Mar 10<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework3.pdf Homework 3 Polynomial Interpolation] '''Typo corrected in Q4 ''' <math>1\rightarrow\pi/2</math><br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework4.pdf Homework 4 Cubic Splines] <br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework5.pdf Homework 5 Least Square and Orthogonal Projection] <br />
|-<br />
|Due Thursday Apr 9<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework6.pdf Homework 6 Orthogonal Functions] <br />
|-<br />
|Due Thursday Apr 21<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework7.pdf Homework 7 Richardson Extrapolation]. There will be a quiz this time.<br />
|-<br />
|Due Thursday May 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/homework8.pdf Homework 8 Differential Equations]. <br />
|-<br />
|}<br />
<br />
===Programing Assignments===<br />
{|<br />
|Due Thursday Mar 5<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw1.pdf Programming Assignment 1]<br />
|-<br />
|Due Thursday Mar 19<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw2.pdf Programming Assignment 2]<br />
|-<br />
|Due Thursday Apr 2<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw3.pdf Programming Assignment 3]<br />
|-<br />
|Due Thursday Apr 16<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw4.pdf Programming Assignment 4]<br />
|-<br />
|Due Thursday Apr 30<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw5.pdf Programming Assignment 5]<br />
|-<br />
|Due Thursday May 14<br />
|[http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Programming/comp_hw6.pdf Programming Assignment 6]<br />
|}<br />
<br />
===Exams Scheduled===<br />
{|<br />
|Feb&nbsp;26<br />
|'''Quiz 1'''<br />
|Root finding, Fixed Point methods<br />
|-<br />
|Mar&nbsp;10<br />
|'''Mid-Term&nbsp;1'''<br />
|Series, Error estimates, Iterative sequences and fixed points, Newton's Method, Discretized Boundary Value Problems (Formulating), Tri-diagonal Systems, Polynomial Interpolation. [[Midterm I Review]]<br />
|-<br />
|Apr&nbsp;2<br />
|'''Quiz 2'''<br />
|Orthogonal projection, Inner product spaces. This quiz will not be an exact question out of the homework, but rather an easy question in the spirit of the homework.<br />
|-<br />
|Apr&nbsp;14<br />
|'''Mid-Term&nbsp;2'''<br />
|Polynomial interpolation, Splines, Orthogonal projection and inner-product spaces, and, of-course, everything else we have learned so far (not kidding!). If you wish, you can use problems on the [http://math.mit.edu/~yfarjoun/Teaching/2009/18.330/Homework/midterm2_review.pdf midterm review] to prepare. I will not provide solutions.<br />
|-<br />
|Apr&nbsp;21<br />
|'''Quiz&nbsp;3'''<br />
| <br />
|}<br />
<br />
===Links===<br />
<br />
*My OCW [http://ocw.mit.edu/ans7870/resources/farjoun/index.html Introduction to Matlab] Course<br />
*[http://www.scipy.org/SciPy SciPy] (Matlab-like python module)</div>Yossi