科学计算软件——Octave安装_weixin_30772261的博客-程序员秘密

技术标签: matlab  操作系统  xcode  

Octave是一个旨在提供与Matlab语法兼容的开放源代码科学计算及数值分析的工具,是Matlab商业软件的一个强有力的竞争产品。

参考:【ML:Octave Installation

General

Installation files for all platforms are available at the GNU Octave Repository on SourceForge.

The Gnu Octave Wiki has installation instructions for Windows and Mac OS X.

The present instance of the course was tested using Octave 3.8.2. Earlier versions of Octave are not guaranteed to work. Very early versions are known to NOT work for the submit.m script.

Windows

Version 4.0.0

Octave 4.0.0 is available, but has a bug in its printf() function which impacts the submit.m script for all exercises. Workarounds are available via the discussion forums. The present instance of the course also uses a SSL method in the submit.m script, which can throw errors with security certificate access to the grader server. Workarounds are available via the discussion forums.

Version 3.6.4

  • The "Microsoft Visual Studio" or "Windows MinGW" version installers can be downloaded from Sourceforge.
  • On Windows 8, you may see a console-related problem whereby Octave crashes and disappears at any syntax error; fix is detailed atstackoverflow.com

Version 3.6.2

  • This bug-fix version was released on 5 June 2012. The "Microsoft Visual Studio 2010" version installer can be downloaded fromSourceforge. It seems more reliable than the MinGW 3.6.1 version, although some annoying bugs have been retained.
  • When installing this version from Cygwin, urlread/urlwrite may fail, resulting in an error message like:/usr/lib/octave/3.6.2/oct/i686-pc-cygwin/urlwrite.oct: failed to load: No such process. Thus the submit function provided with programming exercises also fails (submitWeb still works).
    I successfully worked around this by replacing urlwrite.oct with the file from the Octave/Cygwin 3.6.1 binary distribution. (Problem has also been mentioned in this thread for ml-2012-002.)

Version 3.6.1

  • The most recent version is from 3/5/2012, at the Sourceforge site. Installation instructions for Windows and Cygwin are on the Wiki.
  • If you are having problems with crashes during (re-)plotting, see this bug report concerning libblas.dll versions. You can probably reproduce this problem by typing the command:

    demo plotyy
    

If you have the wrong version of libblas.dll installed, this will generally crash Octave. The libblas.dll.ref version is a slow but stable version.

Version 3.2.4

  • The tutorial on the course website is actually for version 3.2.4. This version is considered "very old" by the Octave Wiki. This version has a bug in the readline.dll file that causes garbage characters to show up when attempting to use command line history editing. Versions 3.4 and higher fix this.
  • Sometimes problems occur with Octave and gnuPlot if you have oct2mat module loaded. Try "pkg unload oct2mat' when you first run Octave. If that solves the problem you can make it permanent by either adding the line to your config file, or by executing "pkg uninstall oct2mat" command[1].

Mac OS X

Version 3.8.1

If you are not afraid of the Terminal you can use Homebrew. This is by far the easiest method of installing everything that is needed. In fact, this may be the best option for versions of OSX prior to 10.9 Mavericks, because the Octave wiki states that the binary installer is to be used "at your own risk" and is "not guaranteed to work" with anything other than OSX 10.9 Mavericks.

Let's install Homebrew as the easiest solution. Open Terminal and type the installation command below, which is listed on the Homebrew home page also, and then hit enter:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

You will need a set of command line tools that are a subset of XCode. If you're comfortable with the Terminal, then use the command below to install just what is needed. Otherwise (or if you have issues), you need to install XCode from App Store, go to the XCode preferences -> Downloads/Components section, and then select Command Line Tools to be installed.

xcode-select --install

Let's install an up to date gcc compiler:

brew install gcc

You will also need to install [MacTeX]. This can be done with Homebrew, as seen below using the Homebrew Cask project, or by downloading and installing from the website (http://www.tug.org/mactex/).

brew install caskroom/cask/brew-cask
brew cask install mactex

Now let's install the plotting software, gnuplot, and have it use native Qt graphics (instead of the older X11 setup):

brew install gnuplot --qt

Finally, let's install Octave (note all build issues have been fixed, as of Nov 4th 2014):

brew tap homebrew/science
brew install octave

And tell Octave to use Qt graphics with gnuplot when plotting:

echo "setenv GNUTERM qt;" >> ~/.octaverc

Now restart your Terminal and launch octave:

octave

Also, to avoid having to constantly change directories after starting octave, the following script will load octave with the Terminal's current working directory automatically set in octave. Let's set it up:

echo '#!/bin/bash' >> /usr/local/bin/oct
echo 'octave -p "`pwd`"' >> /usr/local/bin/oct
chmod +x /usr/local/bin/oct

And to start octave using this script instead (for example when you are working in a project directory and want to load octave with the directory already set):

oct

Known Issues: Executing GNUPlot gives error message on Octave (v 3.4.0) with X11 installed on OS 10.6.8(Snow leopard). For example: octave-3.4.0:10> hist(w) warning: broken pipe -- some output may be lost "Reason: Incompatible library version: libfontconfig.1.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0"

Fix: Open terminal window and type following 3 lines: cd /Applications/Gnuplot.app/Contents/Resources/lib mv libfreetype.6.dylib libfreetype.6.dylib.bak ln -s /usr/X11/lib/libfreetype.6.dylib .

(Source and explanation : http://stackoverflow.com/questions/19932161/incompatible-library-version-libfontconfig-1-dylib-13-instead-of-15)

Linux

Ubuntu

Ubuntu Software Center

Just search for GNU Octave in Ubuntu Software Center and click install. When the installation finishes, you're ready to use Octave.

Command Line

If you prefer using the command line or if you have an Ubuntu based version of Linux that comes without Ubuntu Software Center, you can install Octave by typing this command on a terminal:

(默认安装3.8.1版本)

sudo apt-get install octave

If you get an error "E: Package 'octave3.2' has no installation candidate", then follow these steps

sudo apt-add-repository -y ppa:mtmiller/octave
sudo apt-get update
sudo apt-get install octave

Red Hat / CentOS

Command Line

You can install Octave from the yum repository using the following command lines:

sudo yum install epel-release
sudo yum install octave

Browser (any OS)

It is possible to use Octave online, without installing it on local computer. Web interface has a code editor and REPL console with inline plots. It gives access to Octave 3.6.4.

URL: http://octave.im/

 

转载于:https://www.cnblogs.com/mo-wang/p/5205591.html

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_30772261/article/details/95258986

智能推荐

rancherOs centos修改时区问题_rancher的时间总不对_sloar阳的博客-程序员秘密

修改中国时区问题处理系统信息(centos 、rancherOs)Linux iZwz94wxzv9g5i3u46xwr4Z 3.10.0-514.21.2.el7.x86_64 #1 SMP Tue Jun 20 12:24:47 UTC 2017 x86_64 x86_64 x86_64 GNU/LinuxLinux rancher 4.14.32-rancher2 #1 SMP ...

Android Studio中的Gradle依赖深入讲解_az44yao的博客-程序员秘密

Android Studio由于使用了gradle的进行项目构建,使我们开发app方便很多,下面这篇文章主要给大家介绍了关于Android Studio中Gradle依赖的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考下前言Android studio依赖项目是使用gradle管理的,依赖一个项目、一个jar包、一个工程,都可以在这里进行配置,本文将给大家详细介绍关于Android Studio中Gradle依赖的相关内容,下面话不多说了,来一起看看详细的介绍吧一、不同类型的lib

cron表达式_sysu安仔的博客-程序员秘密

cron表达式主要应用于quartz中,在linux中也有用到,主要功能是设置一个定时器,当到达特定时间时触发任务。 cron表达式主要由七个部分组成,这七个部分分别是秒、分、时、日、月、周、年,每个部分之间由空格分离,顺序必须按照以上顺序,其中年可以省略不写。如:10 12 9 24 11 ? //表示每年的11月24日9点12分10秒10 12 9 24 ...

绳驱动上肢外骨骼机器人开发_incontent:“上肢外骨骼机器人”_MocapLeader的博客-程序员秘密

8月8日东京奥运会刚刚落幕。本届奥运会上,除了激烈的运动赛事,各类高新科技的应用也格外亮眼。比如奥运会工作人员身着动力外骨骼机器人搬运重物,有效降低工作人员在搬运重物时受到的重力压迫伤害。近年来上肢外骨骼机器人得到广泛关注。除了可以提高工人的搬运能力和效率,外骨骼康复机器人还可以穿戴在运动障碍患者的肢体上并向关节提供辅助力。利用外骨骼实现辅助运动训练,可以代替理疗师为患者提供运动康复训练服务,并记录康复治疗参数,提高康复训练的效率和针对性。用于上肢康复训练的外骨骼机器人可以佩戴在人的手臂上,为人的手臂关

DNS欺骗实验 (基于cain的arp欺骗)_R0be1l的博客-程序员秘密

DNS实验步骤:1、实验环境 攻击主机windows XP (192.168.57.130)+ cain靶机windows7 (ip:192.168.57.129)2、实验步骤(1)在windows XP中打开cain 并在这个子网域中开启嗅探。(2)点击APR按钮,选择“APR-DNS”,指定DNS欺骗的域名和DNS请求回应数据包中的IP地址,即虚假服务器ip....

Django项目:CMDB(服务器硬件资产自动采集系统)--10--06CMDB测试Linux系统采集硬件数据的命令05..._weixin_30588907的博客-程序员秘密

cd /py/AutoClient/binpython3 auto-client.py/usr/local/python3/bin/pip install requestspython3 auto-client.pyhttps://www.bejson.com/...

随便推点

SQL语句中IN和EXISTS的效率问题_什么啊什么Q的博客-程序员秘密

两种查询的区别INselect * from A where id in (select id from B);此处select id from B只会执行一次,将所有数据缓存到内存,然后遍历A表中的每条数据进行判断是否存在。EXISTselect * from A as a where exists(select id from B as b where a.id = b...

键盘key_iteye_11039的博客-程序员秘密

vbKeyLButton 0x1 鼠标左键 vbKeyRButton 0x2 鼠标右键 vbKeyCancel 0x3 CANCEL键 vbKeyMButton 0x4 鼠标中键 vbKeyBack 0x8 退格键 vbKeyTab 0x9 TAB 键 vbKeyClear 0xC CLEAR健 vbKeyReturn 0xD 回车键 vbKeyShift 0x10 SHIFT 键 vbKeyCo...

C++ Qt中 类的构造函数 & 析构函数_qt 析构函数_Cherry_keven的博客-程序员秘密

类的构造函数类的构造函数是一个特殊的成员函数,它会在每次创建类的新对象时执行。构造函数的名称与类的名称是完全相同的,并且不会返回任何类型,也不会返回 void。#include <iostream> using namespace std; class Line{ public: void setLength( double len ); double getLength( void ); Line(); // 这是构造函数

Java中为什么要使用抽象类_superfatsheep的博客-程序员秘密

抽象类  抽象类与接口紧密相关。然接口又比抽象类更抽象,这主要体现在它们的差别上:1)类可以实现无限个接口,但仅能从一个抽象(或任何其他类型)类继承,从抽象类派生的类仍可实现接口,从而得出接口是用来解决多重继承问题的。2)抽象类当中可以存在非抽象的方法,可接口不能且它里面的方法只是一个声明必须用public来修饰没有具体实现的方法。3)抽象类中的成员变量可以被不同的修饰符来修饰,可接口中的成员变量

JESD204B接口和Xilinx IP核学习笔记_jesd204b xilinx_fractial的博客-程序员秘密

JESD204B1、jesd204b概述2、时钟3、JESD时钟计算实例1、jesd204b概述jesd204b是一种基于高速SERDES的ADC/DAC数据传输接口。详细介绍可以参考:https://blog.csdn.net/u013184273/category_10859615.html。初学的时候有好多问题没理清楚,现在记录一下:1、jesd204b分为几个子类,其中subclass 1 支持确定性时延,是最为常用的一个。由于AD/DA一般有多个lane来传输数据,但是每条lane上的时延

java正则表达式包含字符串_java使用正则表达式查找包含的字符串示例_翻拍小分队的博客-程序员秘密

本文实例讲述了java使用正则表达式查找包含的字符串。分享给大家供大家参考,具体如下:Hello.java:package hello;import java.util.regex.Matcher;import java.util.regex.Pattern;public class Hello {public static void main(String[] args) {String re ...

推荐文章

热门文章

相关标签