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

4 Ansichten (letzte 30 Tage)
shikhar srivastava
shikhar srivastava am 25 Jan. 2016
Kommentiert: Image Analyst am 7 Feb. 2017
i want code to be such that it takes 5 images and save in 1 .mat file.

Antworten (3)

Walter Roberson
Walter Roberson am 25 Jan. 2016

Image Analyst
Image Analyst am 25 Jan. 2016
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 Kommentare
Image Analyst
Image Analyst am 25 Jan. 2016
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.

Melden Sie sich an, um zu kommentieren.


mona
mona am 3 Feb. 2017
After creat .mat file with images,I need to deal with index of .mat file
  4 Kommentare
Jan
Jan am 7 Feb. 2017
You can load the mat file at once and use the loop to access the loaded contents.
Image Analyst
Image Analyst am 7 Feb. 2017
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by