わかさぎのブログ

プログラミング、Atcoderの勉強とか

MATLABスクリプト解読-2

earch_name2 = sprintf('%s.mat',search_name);

sprintfは変数にも出力できる。というのを使っている。

 

search_name = '20D*';

[filename,pathname] = uigetfile(search_name2, 'Select Oshiro mat file');
Files = dir([pathname,search_name2]);

uigetfile関数のお馴染みの表記

*でヒットしたファイルのパスをリストに格納している。

dirはn行の列ベクトルとして返り値が返ってくる

 

figure(1)
hold on

グラフを表示するときのおまじない

 

...

多分改行するけど続けて書く、の意味

 

grid on
xlim([0 1000])
xlabel('time[us]')
ylabel('噴射率')

grid on は謎。他はmatplotlibに似ている。