필터 지우기
필터 지우기

how to save images in a for loop?

조회 수: 3 (최근 30일)
Sagi
Sagi 2014년 9월 9일
댓글: Star Strider 2014년 9월 9일
hey, I wrote a code to save a few images in a for loop in a cirtin folder,it won't work,please help
for beta=-1:1
...
...
...
xx=sprintf('C:\Users\Sagipc\Desktop\ImageLibrary\beta%g.jpg',beta);
imwrite(pic1,xx,'jpg');
end

채택된 답변

Star Strider
Star Strider 2014년 9월 9일
Simply stating the problem as ‘it won’t work’ doesn’t tell us much.
It looks as though it’s writing ‘pic1’ to every file you create. I would assume you intend a different result.
What are your image file names? How would you want to save them?
  댓글 수: 5
Sagi
Sagi 2014년 9월 9일
that was very helpful, thank u heaps!
Star Strider
Star Strider 2014년 9월 9일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by