MATLAB: 複数のテキストデータから一つの散布図の作り方

Communications ToolboxMATLABscatterscatterplot散布図、日本語

複数のテキストデータ、TA20040101.txt から TA20041231.txt, を読み込みその値を一つの散布図にプロットしたいのですが以下の自分のプログラムだと1テキストファイルに一つの散布図が作られてしまいます。hold onが問題なんだと思うのですがいい考えがないのでアドバイスいただけると嬉しいです。
for i = 1:12
if i<10
monstr = ['0', num2str(i)];
else
monstr = num2str(i);
end
for j = 1:31
if j<10
daystr = ['0', num2str(j)];
else
daystr = num2str(j);
end
filename = ['TA2004',monstr,daystr,'.txt'];
x = load(filename);
scatterplot(x)
hold on
end
end
よろしくお願いします。

Best Answer

2番目以降のscatterplotに、最初に作成されたscatterplotのfigureハンドルを与えれば、figureが再利用できます。
たとえば:
h = scatterplot(randn(100,2));
hold on;
scatterplot(randn(100,2),[],[],'r.',h);