![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
プログラミング
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
C++への書き換えも一瞬 すごい!
昨日作ってもらったソースコードをChatGPTに書き換えてもらった あっという間にC++になった! #include <iostream> #include <vector> #include <fstream> #include <sst...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
ChatGPTにロト7の当選番号予想プログラムを作ってもらってみた
はじめに ロト7の当選番号を予測することは、非常に挑戦的でエキサイティングな試みです。この記事では、長短期記憶(LSTM)ネットワークを使用してロト7の当選番号を予測するためのPythonプログラムを紹介します。 必要なツールとライブラリ ...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABを使って複素数を写像してみる
複素関数を使えば複素数を写像できる。 ディジタル制御では \begin{align}z=e^{sT}\end{align} を使うので\(T=1\)として写像してみる 例えば下のプログラムの例では虚軸が円に写される。 x=0; y=-5:0...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABで台形近似
台形近似で積分を計算してみる Nが刻み数 minが下限、maxが上限 funcが被積分関数 N=100; min=0; max=1; t=linspace(min,max,N); dt=t(2)-t(1); S=zeros(size(t))...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABでオイラーの定数を計算する
詳しくはここ MATLABの行列演算を使うと楽 N=10000; n=1:1:N; result=sum(1./n-log(1+1./n))
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABでウッダル数を求める
ウッダル数は \begin{align}n \times 2^n -1\end{align} の形をしている数である。 MATLABでは次のように計算できる。 n=10; count=1; p=2; for i=1:1:n K(i)=i*p...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABで作ったカレン素数を探すプログラムを改造してみる
カレン数は \begin{align}n \times 2^n + 1\end{align} であるが \begin{align}n \times p^n + 1\end{align} を考える。 n=10; count=1; p=3; f...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABでカレン数とカレン素数をさがす
カレン数は \begin{align}n \times 2^n + 1\end{align} で表される。 カレン数のうち素数のものをカレン素数という。 今回はMATLABでカレン素数を探す。 以下ソース n=10; count=1; fo...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
RNNとLSTMのちがい
参考 RNNは入出力を等しく学習→長期的な依存性の学習が苦手LSTMは入出力に重みを考慮して学習→長期的な依存性の学習が得意
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
NumbersとLSTM
NUMBERSには横滑り現象なるものがあるらしくLSTMで学習して当てる試みがほそぼそとあるらしい Qiitaだとこれとか Github 機械学習に興味あるのでやってみようと思う
![](https://sironekolab.com/wp/wp-content/uploads/2023/08/untitled-320x180.jpg)
matlabのtanとtandの違いを簡単に見てみる
matlabのtanとtandの違いを簡単に見てみる。 まずは89から90どの範囲で重ねて比較。ほとんど同じ値が得られている。 2つの方法の誤差。通常誤差は0であるが微妙に生じている。90度に近くなるにつれて大きくなるようだ。 以下コード ...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
matlabでn以下の最大の素数を求める
100以下であれば prevprime(100) を使えばいい
![](https://sironekolab.com/wp/wp-content/uploads/2023/08/image-320x180.png)
急にMATLABのロゴ画像が欲しくなったとき
コマンドラインに logo と打つと が出力される。
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
collectを使って係数をまとめる
matlabでシンボリック演算を行った際の係数をまとめるときはcollectを使う
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABで遊ぶ例が載ってるInterface買ってみた
Interface買ってみた。CD付きでMATLABでできる例があるらしい。 今後試してみる。
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
LaTeXでいい感じのPDF内リンクを作る
くわしくは プリアンプルに以下を追加すれば動く。 \usepackage{hyperref} \usepackage{pxjahyper} \hypersetup{ setpagesize=false, bookmarksnumbered=...
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
ESP32のGPIOについて
GPIO34以降は入力のみ
![](http://sironekolab.com/wp/wp-content/uploads/2022/11/47-320x180.png)
MATLABで等比数列を実装する
MATLABで等比数列は次のように実装すればいい 以下コード a=2; r=4; m=10; list=ones(1,m).*a; for n=2:1:m list(1,n)=a*r^(n-1); end
![](https://sironekolab.com/wp/wp-content/uploads/2023/06/image-1-320x180.png)
TeXWorksを使うときのbiberの設定
これ を追加して、pLaTeX→biber→pLaTeXでうまくいく