Skip to content

Instantly share code, notes, and snippets.

@westoshy
westoshy / physics.pdf
Last active May 4, 2018 04:36
FrenetSerret
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@westoshy
westoshy / hyperboric.pdf
Last active May 4, 2018 04:37
Draw sinh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@westoshy
westoshy / inv_sincostan.pdf
Last active May 4, 2018 04:38
Draw arcsin
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@westoshy
westoshy / Readme.md
Last active October 15, 2017 07:50
Excelカラーパレット

Excel いろいろ

カラーパレット

Excelグラフのカラーパレットを定義したもの。ページレイアウト-配色から選択することができる。 下記のxmlファイルを次の場所に置くことで選択できるようになる。

C:\Users\ [user名] \AppData\Roaming\Microsoft\Templates\Document Themes\Theme Colors

マクロ

@westoshy
westoshy / sine2d.py
Created May 27, 2017 03:49
2次元正弦波を出力する
# -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
def sine2d(x_size, y_size, a0, a, n_x, n_y, theta_x, theta_y):
[x, y] = np.meshgrid(np.arange(0, x_size), np.arange(0, y_size))
f = a0 + np.sin( (2 * np.pi / n_x) * (x - theta_x) + (2 * np.pi / n_y) * (y - theta_y))
return f
@westoshy
westoshy / smlrnov121.ipynb
Last active May 2, 2019 11:11
スミルノフ高等数学教程121: 平面曲線, その曲率と縮閉線の例題をsympyで実行した #math
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@westoshy
westoshy / normalizedcut.py
Created April 23, 2017 01:51
Scikit-image examples
from skimage import data, segmentation, color
from skimage.future import graph
from matplotlib import pyplot as plt
'''
http://scikit-image.org/docs/dev/auto_examples/segmentation/plot_ncut.html#sphx-glr-auto-examples-segmentation-plot-ncut-py
'''
def normalizedCut(inputImage, c=30, n_seg=400):
@westoshy
westoshy / LinearRegression.matlab
Created March 14, 2017 12:50
線形回帰分析
% http://home.hiroshima-u.ac.jp/ete131/index.cgi?page=Matlab_Excel_Regression
% 被説明変数ベクトルの作成
y = [1 3 4 2 1 0 4]';
% 標本数の取得
T = size(y, 1);
% 説明変数行列の作成
iota = ones(T, 1);
@westoshy
westoshy / fitnorm.matlab
Created March 8, 2017 12:05
音声データの振幅ヒストグラムと正規分布パラメータの推定
load mtlb
%R = normrnd(10, 2, 1000, 1);
subplot(1, 2, 1);
% 正規分布パラメータを推定
[mu, sigma] = normfit(mtlb);
[F, X] = hist(mtlb, 50);
%F = F / trapz(X, F);