Matlabで例えば脳波の時間周波数解析の結果を描画する際、imagescという関数を使って描画することがある。この関数の挙動が何気にわかりづらいので、備忘録として注意点などを整理しておく。 ChatGPT o4-mini-highも間違えていたので、本当に気をつけた方が良い。
I'm using Matlab 2016a and imagesc and matlab2tikz in a loop to display data. For some iterations the data might be empty. An empty data matrix is supported by imagesc but crashes matlab2tikz.
MATLAB’s imagesc command displays the data contained in a matrix array as a colour map, with each element of the matrix appearing as a pixel in the image. The colormap command can be used to specify ...