Having installed Octave I now want to find gradients of gradients of gradients...... of gradients.
This is a note to remind me to do this.
So, turns out there is a function which does this:
gradient(F)
so, here's me plotting a sine wave, and then drawing gradients of that graph:
x=0:0.1:20
y=sin(x)
plot(y)
hold all
plot(gradient(y)*10)
hold all
plot(gradient(gradient(y))*100)
hold all
plot(gradient((gradient((gradient(y)*10))*10))*10)
plot(gradient((gradient((gradient((gradient(y)*10))*10))*10))*10)
A catalogue of 'stuff' which somehow will help me through life by helping me remember problems I've solved, how I solved them and thoughts which will be otherwise forgotten (some of which might be of use later on).
Showing posts with label graph. Show all posts
Showing posts with label graph. Show all posts
Saturday, 6 April 2013
Tuesday, 26 March 2013
installing Octave on Mac OS X 10.6 and 10.7
So, just read the wiki here. As it's open source, they havent yet made a pkg installer for it. Apparently, the best thing to do is to use a Package Manager to install it for you.
I've just tried Fink but the website isn't working. Looks like they've moved their website to http://fink.thetis.ig42.org/. Apperantly there's no pkg installer for this either! Here's the download for the binary.
I gave up here and found that MacPorts have an installer.
Installed MacPorts alright, but when I tried to run the command:
Having done all this, still came up with an error:
I think it's because we have a proxy server which looks like complicated to add to MacPorts!
Oh well, might just try Matlab! (student version £55!)
....... a little time later......
So I'm now trying at home on OS X 10.7.5
Installed MacPorts
trying to install octave but comes up with:
I've just tried Fink but the website isn't working. Looks like they've moved their website to http://fink.thetis.ig42.org/. Apperantly there's no pkg installer for this either! Here's the download for the binary.
I gave up here and found that MacPorts have an installer.
Installed MacPorts alright, but when I tried to run the command:
sudo port install octave-devel +atlas+docs
It came up with the error not knowing what the command "port" was. I had to type in:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
One prerequisite is to have xcode installed.
Having done all this, still came up with an error:
Error: Port octave-devel not found
I think it's because we have a proxy server which looks like complicated to add to MacPorts!
Oh well, might just try Matlab! (student version £55!)
....... a little time later......
So I'm now trying at home on OS X 10.7.5
Installed MacPorts
trying to install octave but comes up with:
Error: Port octave not foundTurns out you have to selfupdate MacPort in order for it to sync something or other. Type:
sudo port -v selfupdateThis then came up with the error:
rsync: failed to connect to rsync.macports.org: Connection refused (61)
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 10
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failedDoh! Just did a search and found this. Turns out I have PeerGuardian running. Turned it off and ran selfupdate again which worked fine. So, next I tried installing octave again:
Doh! I read this article which tells how other people are having the same trouble. Looks like one of the sync files on a server must be wrong. selfupdating port at some point will fix it;sudo port install octave---> Computing dependencies for octaveError: Dependency 'atlas' not found.
sudo port -v selfupdateWhat do you know? It worked!!
sudo port install octave +accelerate +gcc45
Labels:
binary,
c programming,
Command Line,
data,
Fink,
graph,
MacPorts,
matlab,
Octave,
OS X,
programming,
sudo,
terminal,
x11,
xcode
Subscribe to:
Posts (Atom)
