Re: [問題] 跑回圈存圖檔已回收
※ 引述《snaredrum (好聽木琴)》之銘言:
: 不好意思 新手發問,雖然爬過文,可是看不太懂..
: 我想要跑完回圈 存圖檔案..
: ex:
: for n=1:30
: for i=1:100
: a(i)=xxxx
: y(i)=####
: ......
: ......
: end
: plot(a,y)
: end
: 結果出來就只有一張圖 就是n=30那張...
: 我想要對每個給定的n 就畫出依張圖 所以會有30張,
: 那我希望檔名可以存成 n1,n2,n3... n30 這該如何做呢?
: 還有 看過 圖片上方就寫 n=1,
: 我想在n1圖片上方打上n=1 那該如何做呢? 30張 都想這樣子打又該如何打呢?
: 感謝前輩賜教...
h = figure( 1 ) ;
set( h , 'Visible' , 'off' ) <=加速用,可有可無
for n=1:30
clf
for i=1:100
a(i)=xxxx
y(i)=####
......
......
end
plot(a,y)
title( [ 'n=' , num2str( n ) ] )
saveas( h , [ 'n' , num2str( n ) , '.png' ] )
end
先幫你存成png
我自己經驗是太大張圖用bmp來存的話
會說記憶體不足
存成png倒是沒這個問題
--
On the surface, your parents sought a private life, using their great talents
to provide for you. They learned to twist the lies of church and government,
believing themselves masters of the system. But the parasites say "NO! The
child has a duty! He'll go to war and die for the nation."
─Andrew Ryan
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.24.116
推
07/08 11:15, , 1F
07/08 11:15, 1F
→
07/08 11:15, , 2F
07/08 11:15, 2F
→
07/08 11:15, , 3F
07/08 11:15, 3F
推
07/08 11:33, , 4F
07/08 11:33, 4F
→
07/08 14:24, , 5F
07/08 14:24, 5F
→
07/08 14:25, , 6F
07/08 14:25, 6F
推
07/08 23:23, , 7F
07/08 23:23, 7F
推
07/09 00:14, , 8F
07/09 00:14, 8F
→
07/09 00:15, , 9F
07/09 00:15, 9F
推
07/09 07:57, , 10F
07/09 07:57, 10F
→
07/09 07:57, , 11F
07/09 07:57, 11F
討論串 (同標題文章)