how to save multiple images in .mat file using matlab software.
4 ビュー (過去 30 日間)
古いコメントを表示
i want code to be such that it takes 5 images and save in 1 .mat file.
0 件のコメント
回答 (3 件)
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
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
2017 年 2 月 3 日
After creat .mat file with images,I need to deal with index of .mat file
4 件のコメント
Jan
2017 年 2 月 7 日
You can load the mat file at once and use the loop to access the loaded contents.
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 Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!