Octave for windows with Visual Studio

http://wiki.octave.org/Octave_for_Microsoft_Windows

Octave with Visual Studio

Octave binaries compiled with Microsoft Visual Studio are available for download from Octave-Forge site. These binaries come in the form of an easy-to-use installer (created with NSIS) and are provided in 2 flavors: pre-compiled version for Visual Studio 2008 and for Visual Studio 2010.

These binaries do not include the Microsoft Visual C++ compiler. This must be installed separately, but is only required if you plan to compile and link source code against the pre-compiled octave release. If the Visual C++ compiler is not present on the target system, then the Visual C++ runtime libraries must be installed prior the installation of these binaries. These runtime libraries are support libraries that are required by any code compiled with the Visual C++ compiler. They can be downloaded for free from the Microsoft download site:

Note that if you already installed other software on your system, there is a possibility that these runtime libraries are already present. Search for a files named msvcr90.dll (Visual Studio 2008) or msvcr100.dll (Visual Studio 2010) in the %WINDIR% directory (usually C:\WINDOWS).

[edit]Installation

The pre-compiled versions for Visual Studio come in the form of a self-installing executable. Simply download the executable, run it and follow the installer instructions. To avoid possible problems with white spaces in the octave paths, it is strongly recommended to install octave in a directory that do not contain any white spaces.

Octave-Forge packages are not installed by default. To install packages, expand the section "Octave Forge" in the component selection page of the installer and select the packages you wish to install. Note that installed packages are not loaded by default. To use the packages, you still need to load them into octave.

[edit]Printing (installing Ghostscript)

In order to use the print command ghostscript must be installed. The installer may be obtained at sourceforge.

The instructions below assume the GLP version of Ghostscript is installed with the Destination directory C:\Program Files (x86)\GPLGS\. The Destination directory may be different for 32 bit and 64 bit windows and can also change for different versions of Ghostscript. Therefore, it is important that the user make note of the Destination directory used to install Ghostscript and use it in place of the Destination directory used in these instructions.

In order for Octave to find Ghostscript, the directory containing Ghostscript's command line program must be in the command shell's path. The name of Ghostscript's command line program may vary. Some examples are gswin32c.exegswin64c.exegs.exe, and mgs.exe. To directory containing Ghostscript's command line program may either be added to the command shell's using Windows Control Panel, or by having Octave modify the path variable to include the directory where Ghostscript's command line programs resides.

For the latter, to following lines may be placed in the ~/.octaverc file (where ~ indicates the user's home folder). The variable gs_path should be set to the Destination directory where Ghostscript was installed.

 cmd_path = getenv ("path");
 gs_path = 'C:\Program Files (x86)\GPLGS\';
 if (isempty (strfind (cmd_path, gs_path)))
   setenv ('path', strcat (cmd_path, pathsep (), gs_path));
 endif

In this case, the value of gs_path has been set to the location of Ghostscript's command line program for the GPL's 8.15 version of Ghostscript. The location for other versions may differ. Please determine the location of the installed Ghostscript command line program and make the needed adjustments to these instructions.

To set the path via the Control Panel,

  • Go to Control Panel --> System and Security --> System
  • Click Advanced System Settings
  • Click Environment Variables
  • In the System Variables area, locate the Path variable, highlight it and click Edit.
  • Add the Destination directory where Ghostscript is installed and confirm the change by clickiing OKOKOK.

If the 64 bit version of Ghostscript is installed, Octave will not automatically detect it. To use the 64 bit version an option telling Octave about it must be passed to the print command. For example to produce PDF output for a figure, using the 64 bit version of Ghostscript, the command below may be used.

 print -Ggswin64c.exe figure.pdf

At this point most of Octave's printing functionality should work. When output is produced using the print command the warnings below will be given.

 warning: print.m: epstool binary is not available.
 Some output formats are not available.
 warning: print.m: fig2dev binary is not available.
 Some output formats are not available.
 warning: print.m: pstoedit binary is not available.
 Some output formats are not available.

For the print command to be fully functional, each of these utilities will also need to be installed, and their locations added to the Path variable via either the Control Panel or Octave's ~/.octaverc file.

[edit]Using the Visual C++ compiler with Octave

As of version 3.6.1, the Microsoft Visual C++ compiler is not automatically detected. If you need to use it from octave (for instance to compile a MEX, OCT file, and building packages), then you must configure your system by updating the appropriate environment variables: %PATH%%INCLUDE% and %LIB%. One way to achieve this easily is to call the vcvarsall.bat script (from the Visual C++ installation directory) prior executing octave. You can for instance automate this by creating a batch script with the following content (adapt paths to your actual installation):

call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
"C:\Octave-3.6.1\bin\octave.exe"

[edit]Octave 3.6.4

[edit]Download

Octave-Forge

[edit]Content

  • Octave 3.6.4
  • OpenBLAS-0.2.2 (dynamic architectures, up to 4 threads)
  • ATLAS 3.8.4 single-threaded and multi-threaded (2 threads)
  • All required libraries
  • Gnuplot 4.4.4
  • FLTK
  • 82 packages from Octave-Forge (Must be installed through the Octave installer, see README: 3. Content)

[edit]Octave 3.6.2

[edit]Download

Octave-Forge

[edit]Content

  • Octave 3.6.2
  • OpenBLAS-0.1.1 (dynamic architectures, up to 4 threads)
  • ATLAS 3.8.4 single-threaded and multi-threaded (2 threads)
  • All required libraries
  • QtHandles
  • Octave GUI (experimental, compiled from development sources)
  • Gnuplot 4.4.4
  • 72 packages from Octave-Forge (see README: 3. Content)

[edit]Octave 3.6.1

[edit]Download

Octave-Forge

[edit]Content

  • Octave 3.6.1
  • ATLAS 3.8.4 single-threaded (SSE/SSE2/SSE3) and multi-threaded (SSE3, 2 threads)
  • All required libraries
  • QtHandles
  • Octave GUI (experimental, compiled from development sources)
  • Gnuplot 4.4.4
  • 72 packages from Octave-Forge

[edit]Building from source

Instructions are available from the Octave-Forge repository, see [1]

[edit]Alternative

In addition to the instructions provided in the Octave manual and Octave-Forge repository, a basic toolkit for building Octave in windows using the MSVC compiler has been produced by Michael Goffioul. It consists of a set of scripts that can be used to compile Octave and its dependencies.

A pre-compiled (with VS2010) version of everything has also been provided, so it is not necessary to recompile everything from scratch. The files can be found at:http://dl.dropbox.com/u/45539519/octave-build2.zip and http://dl.dropbox.com/u/45539519/VC10Libs.zip

Note that this is not a enterprise-level SDK, so don't try to start an enterprise with it.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Octave是一款开源的科学计算软件,它提供了类似于MATLAB的功能,适用于数值计算、数据分析和可视化等领域。在Windows上安装Octave,可以按照以下步骤进行: 首先,需要访问Octave的官方网站,从官方网站上下载最新版本的Octave安装包。通常情况下,Octave提供了32位和64位两种不同的安装包,可以根据自己的操作系统选择合适的版本进行下载。 下载完成后,双击安装包进行安装。在安装过程中,可以选择安装路径、添加快捷方式等选项进行个性化设置。 安装完成后,打开Octave软件,首次运行时可能需要一些初始化的设置,比如选择默认工作路径、配置字体等。 安装并初始化完成后,就可以开始使用Octave进行科学计算了。Octave提供了丰富的数学函数库和绘图功能,用户可以使用Octave进行矩阵运算、统计分析、数据可视化等操作。 另外,在Windows环境下,Octave也可以与其他工具集成,比如与Microsoft Office套件结合使用,进行数据分析和报告生成。用户还可以自行安装一些Octave的插件和扩展功能,以满足特定的科学计算需求。 总之,通过简单的下载安装步骤,用户就可以在Windows系统上安装Octave软件,并且使用它进行科学计算和数据分析。Octave作为一个免费开源的软件,为用户在Windows平台上进行科学计算提供了一个非常便捷的选择。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值