how to save multiple images in .mat file using matlab software.

조회 수: 6 (최근 30일)
shikhar srivastava
shikhar srivastava 2016년 1월 25일
댓글: Image Analyst 2017년 2월 7일
i want code to be such that it takes 5 images and save in 1 .mat file.

답변 (3개)

Walter Roberson
Walter Roberson 2016년 1월 25일

Image Analyst
Image Analyst 2016년 1월 25일
Try save():
save(fullMatFileName, 'image1', 'image2', 'image3', 'image4', 'image5');
where the imagen are the variable names of the different image arrays in your program.
  댓글 수: 4
Image Analyst
Image Analyst 2016년 1월 25일
What does that mean. To get it, you simply click and drag your mouse over it, then copy it and paste it into an editor window.

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


mona
mona 2017년 2월 3일
After creat .mat file with images,I need to deal with index of .mat file
  댓글 수: 4
Jan
Jan 2017년 2월 7일
You can load the mat file at once and use the loop to access the loaded contents.
Image Analyst
Image Analyst 2017년 2월 7일
No, you don't need a loop. If you call load() without accepting the result into a structure,
load(filename);
it just "poofs" the variables into the workspace with their actual original name. No loop needed.
If you accept into a structure like
s = load(filename);
The 50 variables will be fields/members of the s structure. Then you can use the fieldnames() function for get the variable names.

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

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by