#author("2026-07-10T16:47:41+09:00","","")
#contents

*[[MATLAB概要>http://www.mathworks.co.jp/products/matlab/]] [#kfd3445b]
-[[MATHWORKSへのリンク>http://www.mathworks.com/]] (MATLABの発行元) 
-[[MATLAB 日本語サイト 日本支社へのリンク>http://www.mathworks.co.jp/]]
-連絡先~
The MathWorks GK~
マスワークスジャパン~
第四営業部 伊藤由美~
〒107-0052~
東京都港区赤坂4-15-1 赤坂ガーデンシティ7F~
Tel(直通):03-6367-6903~
Tel(代表):03-6367-6700 Fax:03-6367-6710~
Mail:Yumi.Ito@mathworks.co.jp

*当研究室契約内容 [#x67a1232]
-鋼構造研究室では,MathWorksとライセンス契約を締結しており,汎用数値計算プログラム“MATLAB”を使用することが可能です.
-現在の契約内容 
|解析プログラム|MATLAB R2009b|
|同時ユーザー数|3 |
|ネットワークサーバ(2006.10以降)|NOAH2(Dell製 Presicion690, Windows XP) |
|サービス期間(この期間以降も使用可)|2009/09/07〜2010/10/01 (NOAH2)|
|ライセンスNo.|604938|


*インストール [#q7a9e7ca]
-MATLABのインストールに関する一連の作法を作成しました.
([[参照>http://www.mathworks.com/access/helpdesk/help/base/install/index.html?/access/helpdesk/help/base/install/install.html&http://www.mathworks.com/support/install.html?]])
--1.必要なファイルをNoah2のShareフォルダー(\\Noah2\shareddocs\matlab\R2009b)からダウンロードする。OSによって差異があります。
---Windows(32bit)の場合:win32フォルダー、license.dat
---Windows(64bit)の場合:win64フォルダー、license.dat
---Linux(32,64bit)の場合:unixフォルダー、license.dat
---Macの場合:unixフォルダー、license.dat
--2.インストーラーを起動する。
---[[Windowsの場合>http://www.mathworks.com/access/helpdesk/help/base/install/index.html?/access/helpdesk/help/base/install/install.html&http://www.mathworks.com/support/install.html?]]~
a. win32(win64)フォルダー内のsetup.exeをダブルクリックする。~
#br
b. 'Install automatically using the Internet(インターネット経由で自動的にインストールする)'を選択し、
次の画面のライセンス条項にも同意する。~
#br
c. Mathworksアカウントへのloginを要求されるので、次の情報を入力する。
#br
CENTER:EMAIL::koyama@arch.t.u-tokyo.ac.jp~
CENTER:PASSWD::Tsuyosh1~
#br
次の画面でライセンス選択を要求されるが既に選択されたもの(604938)をそのまま選択する。~
#br
d. インストール形態選択画面で「Typical(基本)」を選択し、次の画面でインストール先フォルダーを指定する。~
#br
e. ライセンスファイルの箇所の入力を要求されるので、先ほど保存したファイル「license.dat」を参照する。その
後は指示にしたがってインストールを終了する。
#br
f. デスクトップに表示されたMATLABのアイコンをダブルクリックしてプログラムが立ち上がれば、インストール成功。

---LINUXの場合~
a. tempディレクトリを作成し、Noah2のShareフォルダーからダウンロードしたファイルを保存する。下記に例を
示す。
  sudo yum install libX*
  cd /tmp
  mkdir mathworks_downloads
  cd mathworks_downloads
以降このディレクトリを$TEMPと呼ぶ.~
#br
c. $TEMPディレクトリにて tar -xf matlab_installer_xxxx.tar (xxxxの部分は glnx86(32bit),glnxa64(64bit))と入力し、archiveファイルを展開する。~
#br
d. ./install と実行してインストールを行う。~
#br
e.'Install automatically using the Internet(インターネット経由で自動的にインストールする)'を選択し、
次の画面のライセンス条項にも同意する。~
#br
f. インストール先のフォルダーを指定する。次の画面で
Mathworksアカウントへのloginを要求されるので、次の情報を入力する。
#br
CENTER:EMAIL::koyama@arch.t.u-tokyo.ac.jp~
CENTER:PASSWD::d4yqnxqz~
CENTER:Activation Key:11394-98694-39354-47912-13844~
CENTER:File Installation Key:33807-20270-34825-36953
#br
次の画面でライセンス選択を要求されるが既に選択されたものをそのまま選択する。~
#br
g. インストールするプログラムの選択画面では、OSに従ってバージョンを選ぶ(Linux(x86)(32bit),Linux(x86_64)(64bit))。インストールするアイテムはMATLABのみ(LicenseManagerは不要)。~
#br
h. ライセンスファイルの箇所の入力を要求されるので、先ほど保存したファイル「license.dat」を参照する。~
i. SymbolicLinkを/usr/local/binに作成することに同意する。
その後は指示にしたがってインストールを終了する。~
#br
f. terminalでmatlabとタイプして実行して、プログラムが立ち上がればインストール成功。~
#br
TroubleShooting: もしmatlabを実行したときに次のようなエラー、~
#br
  License checkout failed.
  License Manager Error -96
  MATLAB is unable to connect to the license server. 
  Make sure that the MATLAB client machine can communicate with the hostname listed in the SERVER line
  of the license file, and that the port listed in the SERVER line is not blocked by a firewall.~
  Troubleshoot this issue by visiting: 
  http://www.mathworks.com/support/lme/R2009b/96~
  Diagnostic Information:
  Feature: MATLAB 
  License path: /root/.matlab/R2009b_licenses:/opt/matlab/r2009b/licenses/license.dat:
  /opt/matlab/r2009b/licenses/network.lic 
  FLEXnet Licensing error: -96,7. System Error: 2
#br
がでた場合には次のチェックを行う。
  ping noah2
  nslookup
もしpingの方がうまくゆかないときにはさらに、
  ping noah2.
を試してみる。これで成功する場合にはファイル MATLABROOT/licenses/network.lic の一行目にある
'NOAH2'を'NOAH2.'とする。

*研究室外からLicenseServerにアクセスする方法 [#t0ef1211]
-First modify the file 'network.lic'. The file is located in 
the directory "/opt/matlab/r2009b/licenses". It should have the lines
 SERVER localhost ID=604938 27010
 USE_SERVER

-Connect to the license server through port forwarding. One requires 
two ports. One for the lmgrd and one for the MLM. These are
--lmgrd:27010
--MLM:27011

On a linux box one can execute the command,
 ssh -L 27010:192.168.1.2:27010 -L 27011:192.168.1.2:27011 -p 22122 student@stahl.arch.t.u-tokyo.ac.jp

-Once this is done, start up matlab. 
http://www.cl.cam.ac.uk/local/sys/matlab/

 

*チュートリアル [#n4605b11]
-Cybernet社提供のもの(日本語)~
http://www.cybernet.co.jp/matlab/support/technote/
-Mathworks社提供のもの(英語)~
http://www.mathworks.com/academia/student_center/tutorials/launchpad.html
-インターアクティブチュートリアル(Mathworks提供、英語)~
http://www.mathworks.com/academia/student_center/tutorials/register.html

*メモ [#bed34666]
-Matlabが吐くepsをdvipdfmxで処理すると切れる
>
どうやら原因はepsのファイル内に記述された『ここからここまでが図形が入っている領域ですよ』というのを示したBoundingBoxの値の一部が負値をとっていることに原因があるようです。dvipdfmxは非負値の場合のみしか正しくepsを処理できないようで、この問題を修正するためにはepstopdfというコマンドを利用して、epsをpdfに変換してincludegraphicsで取り込めば解決すると書いてありました。
&br;
実際にepstopdfを使う方法を試してみると、うまく図が表示されるようになりました。しかしpdfをincludegraphicsで取り込む際にはbbオプション、あるいはebbコマンドを利用してBoundingBoxを指定してあげる必要があります。これはepsファイルに比べて取り回しがしにくくなりますので、ここではさらにxpdfのpdftopsコマンドを利用して、変換したpdfをさらにepsに戻してみました。この戻したファイルでも確認したところ図が切れずに表示されることを確認しました。
&br;
コマンドで表すと以下の作業をすることで、Matlab epsのBoundingBoxを正しい値に修正することができました。
&br;
 for f in `find . -name "*.eps"`
 do
     epstopdf --outfile=$f.pdf $f
     pdftops -eps $f.pdf $f.eps
     mv $f.eps $f
     rm $f.pdf
 done

<



[[f8betznet]]
https://hedgedoc.envs.net/s/fgshmPxzb
https://notes.fabiomanganiello.com/s/igi8E90ezM
https://knowhow.brainbot.com/s/r47KMJP7C


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS