2012-04-06 9 views
0

gplotをファイルに保存/出力する方法を提案できますか?私はまだMatlabで物事を把握しようとしています。ありがとう。gplotの出力をmatlabのファイルに保存するには?

A=[0,1,1,1,1,1,0,0,0; 
1,0,1,0,0,0,1,0,0; 
1,1,0,1,0,0,1,0,0; 
1,0,1,0,1,0,0,1,0; 
1,0,0,1,0,1,0,0,1; 
1,0,0,0,1,0,0,0,1; 
0,1,1,0,0,0,0,1,0; 
0,0,0,1,0,0,1,0,1; 
0,0,0,0,1,1,0,1,0]; 

coords=[0 0; 
.5 0; 
1 0; 
0 .5; 
.5 .5; 
1 .5; 
0 1; 
.5 1; 
1 1]; 

gplot(A,coords) 

答えて

0

は、私はあなたが出力したファイルに数字をしたいと思います:

saveas(fig_handle, 'filename','bmp') 

または

print('-dbmp',fig_handle) 

トリックはあなたが数字を扱う取得する必要gplot呼び出す前にある

fig_handle = figure 
+0

ありがとうございます。わかった。 – Naga

+1

gcf(現在の図のハンドル)を使用することもできます。saveas(gcf、 'filename'、 'bmp'); – Serg

関連する問題