2015-12-01から1ヶ月間の記事一覧

制御のメモ

MATLABで関数ワークスペースからベースワークスペースの変数を呼び出す

http://jp.mathworks.com/matlabcentral/newsreader/view_thread/251927 ベースワークスペースにいるvarを呼び出したいとき function hoge v = evalin('base','var') end

MATLABで直流モーター速度制御系における時定数とゲインのパラメータ同定

A/D変換がボトルネックになっているのか、RoTHシミュレーションのタイムステップが効いてくるっぽい Arduino Mega2560で、timestep=1/30[sec]でうまくいった。同定結果 ==result== Time step = 0.050000 K = 0.665923 T = 3.466667 u_offset = 1.269975 ==re…

MATLABでGaussの消去法(Gaussian Elimination)を実装する

上三角行列に基本変形するものを消去法、対角行列に基本変形するものを掃き出し法(Gauss-Jordan Sweeping-out method)という(?) 掃き出し法だと後退代入が不要となる。 % A = [2 6 28; % 3 4 27; % 4 14 60]; % % b = [34 66 68]'; A = [1 -2 3 3 1 -5 -2…

MATLABでデローニー(ドロネー)分割

http://jp.mathworks.com/help/matlab/math/delaunay-triangulation.html

MATLABでPlot上のTextを最前面に出す

uistack()はなぜか使えなかった。 set(hText, 'Layer', 'front'); を使う。 clear all; close all; [X,Y]=meshgrid(1:11); figure; hold on; plot(X,Y,'k'); plot(Y,X,'k'); axis off; I=rand(11); surface(I); h=linspace(0.5,1,64); h=[h',h',h']; set(gcf…

Fortran入門

http://www.research.kobe-u.ac.jp/csi-viz/members/kageyama/lectures/H22_FY2010_former/ComputationalScience/2_1_f95a.html

MATLABでgridmapを描く

http://www.mathworks.com/matlabcentral/answers/154877-how-to-plot-a-10-10-grid-map-and-how-to-number-the-grid-cells-sample-pic-is-attached-here [X,Y]=meshgrid(1:11); figure; hold on; plot(X,Y,'k'); plot(Y,X,'k'); axis off; I=(rand(11)); su…

Makefileのマクロ

http://yut.hatenablog.com/entry/20120702/1341185909 変数 説明 $@ ターゲットファイル名 $ $? ターゲットより新しい全ての依存ファイル名 $^ 全ての依存ファイル名 $+ Makefileと同じ順番の依存ファイル名 $* suffixを除いたターゲット名 $% アーカイブだ…

gfortranコンパイラに使っているFORTRANのバージョンを伝える

拡張子で指定する http://stackoverflow.com/questions/10884260/how-can-gfortran-tell-if-i-am-compiling-f90-or-f95-code.f, .f90, f95, .f03, .f08

Railsで複数カラムに対するユニーク制約を追加する

http://stackoverflow.com/questions/4870961/rails-validate-uniqueness-of-multiple-columns validates :attr, uniqueness: {scope: [:attr1, ... , :attrn]}

Arduino UNOでAVR DragonのdebugWireを使う

http://www.hilltop-cottage.info/blogs/adam/debugging-arduino-using-debugwire-atmel-studio-and-an-avr-dragon/

AVR DragonでdebugWireを使う

http://startelc.com/AVR/Avr_3WdragonDbg.htmlhttp://gataro-avr-ken.cocolog-nifty.com/blog/2012/01/avr-dragondebug.htmlhttp://gataro-avr-ken.cocolog-nifty.com/.shared/image.html?/photos/uncategorized/2012/01/03/dragon_statemap.jpghttp://yak-…

Pythonでbinding.pryしたい

https://gist.github.com/obfusk/208597ccc64bf9b436ed import code #some code code.interact(local=locals())

G-codeについて

NCプログラム基礎知識 http://nc-program.s-projects.net/g-code.htmlNCプログラムの教科書 http://www.dlmarket.jp/products/detail/330502NCコードの説明 http://www.natuo.com/mcnohanasihuremu2ncko-do.htmNCプログラムとは http://mc.go4la.com/categ…

pygameのインストール

http://stackoverflow.com/questions/17869101/unable-to-install-pygame-using-pip sudo pip install hg+http://bitbucket.org/pygame/pygame

Kivyのインストール

https://github.com/kivy/kivy/issues/3309 USE_OSX_FRAMEWORKS=0 pip install git+https://github.com/kivy/kivy.git@1.9.0

Fix the license #17 — apple/swift

https://github.com/apple/swift/pull/17#issuecomment-161893093

Arduinoで同時に複数の処理を行う

C++のクラスを使ってLEDとサーボを同時に処理 https://learn.adafruit.com/multi-tasking-the-arduino-part-1/a-classy-solution 基本的には逐次処理(マルチスレッドはできない)

Solidworksで組み立て図をつくる

Solidworksでケーブル配線

An Introduction to Electrical Routing in SolidWorks [Webcast] https://www.youtube.com/watch?v=jBG8YI1C8G4SOLIDWORKS Routing-Electrical - Cables https://www.youtube.com/watch?v=JESQEXxDnYQ

AndroidのOpenCVでMatからbyte[]に変換する

http://answers.opencv.org/question/4761/mat-to-byte-array/

OpenGL ES2.0のビューイングパイプライン

http://tkengo.github.io/blog/2014/12/27/opengl-es-2-2d-knowledge-1/Data prepare Vertex Coordinate Vertex Index Texture ID Texture UV Coordinate Transform matrix GPU Process Vertex Shader World Coordinate Transform View Corrdinate Transform…

CardboardPassthroughでメソッドが呼ばれる順番

onCreate() ->コールバック系 onSurfaceCreated()-> - loadGLShader() - createTexture() - startCamera()//onSurfaceChanged()//onRenderShutdown()onNewFrame() - glClear() - updateTexImage() - getTransformateMatrix()onFrameAvailable() - requestRen…