Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active April 13, 2018 23:02
Show Gist options
  • Save kjunichi/5667139 to your computer and use it in GitHub Desktop.
Save kjunichi/5667139 to your computer and use it in GitHub Desktop.

2018追記

Ubuntu16.04でのビルド方法

コメント欄で教えていただきました。

OSX homebrew

setenv('GNUTERM','qt')    # Default graphics terminal with Octave GUI
setenv('GNUTERM','x11')   # Requires XQuartz; install gnuplot --with-x
setenv('GNUTERM','wxt')   # wxWidgets/pango; install gnuplot --wx
setenv('GNUTERM','aqua')  # Requires AquaTerm; install gnuplot --with-aquaterm
setenv('GNUTERM','dumb')  # Console

Ubuntu12.04に入れた

Compiling Octave 3.8 for Ubuntu | Michael Hirsch見ながら やったが、エラー

ATL_ってシンボルが無いと怒られる
sudo update-alternatives --set liblapack.so.3gf /usr/lib/lapack/liblapack.so.3gf

これで、先に進めた

Link

余弦波の解析

Link

ほぼそのまま動いた

pkg load signal

t = 0:1e-4:1;
x = 2.5+cos(2*pi*100*t);
y = hilbert(x);
plot(t,real(y),'b','linewidth',2);
hold on;
plot(t,imag(y),'r','linewidth',2);
set(gca,'xlim',[0 0.1]); grid on;
xlabel('Seconds');
hold off
plot3(t(1:1e3),real(y(1:1e3)),imag(y(1:1e3)));
xlabel('Time','fontsize',14); ylabel('Re{z(t)}','fontsize',14);
zlabel('Im{z(t)}','fontsize',14);

パッケージ

インストール

pkg install -forge image

使い方

pkg load image

Mavericksでtexinfo周りがうまく動かず、パッケージがインストールできない

Ubuntu12.04ではCompiling Octave 3.8 for Ubuntu | Michael Hirschの通りで、すんなりインストール出来た。その通りだと/opt/octave以下にインストールされるんだが。。)

グラフを保存

参考資料

関連記事

関連

アクセス解析タグ

@scivision
Copy link

@kjunichi
Copy link
Author

kjunichi commented Jan 5, 2018

@scivision

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment