0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[macOS]Mathmaticaを手軽に利用する

Last updated at Posted at 2022-11-23

Mathmaticaを手軽に無料で利用する方法は、2つあるようだ。一つは、Wolfram Cloudの無料アクセス。もう一つは、Wolfram Engine。それぞれの利用方法を説明する。

Wolfram Cloud

Wolfram Cloudの利用を開始する。

  1. Wolfram Cloudの登録ページを開く。
    Wolfram Cloud
  2. "Sign up for free"を選ぶ。
  3. Wolfram IDを作成する。
  4. Wolfram Cloudのトップ・ページで"New Notebook"を選ぶ。
  5. 登録したメールアドレス宛に確認メールが届くので、承認する。

ノートブックで、命令を入力して、Shift+Enterで実行する。

In[1]:= 5 + 7
Out[1]= 12

mathmatica.png

Wolfram Engine

Wolfram Engineの利用を開始する。

  1. Wolfram Engineのダウンロード・ページを開く。
    Wolfram Engine
  2. ダウンロードしてインストールする。

Wolfram ScriptアイコンをダブルクリックするとTerminal.appが開くので、命令を入力してEnterで実行する。

Wolfram Language 13.1.0 Engine for Mac OS X x86 (64-bit)
Copyright 1988-2022 Wolfram Research, Inc.
 
In[1]:= 5 + 7
 
Out[1]= 12
 
In[2]:=

Wolfram Scriptは、ターミナルでwolframscriptコマンドを実行しても利用できる。

また、スクリプト・ファイルを作成して実行することもできる。

$ cat demo.wls 
#!/usr/bin/env wolframscript
Print[5 + 7]
$ chmod +x demo.wls
$ ./demo.wls
12

ただし、ターミナルでWolfram Scriptを実行する方法では、グラフ表示はできない。

ソースコード
GitHubからどうぞ。

https://github.com/murakami/workbook/blob/master/mathematica/demo.wls - GitHub

【関連情報】

Wolfram Cloud
Wolfram Engine
WolframScript
Cocoa.swift
Cocoa勉強会 関東<
Cocoa練習帳

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?