how to store the images by some another name after reading in a for loop???

1 view (last 30 days)
hello all, i wrote the following program to read multiple images now what i want to do is i want to store these images one by one to some location by some names like g1.jpg,g2jpg, can i do this ??
close all; clear all; clc; for i=1:5 m=imread(['C:\Users\shree\Desktop\1\im' num2str(i) '.jpg']); %r=imresize(m,[50 50]); %l=rgb2gray(r); %a=l(:); figure,imshow(m); end

Accepted Answer

Chandrasekhar on 7 Mar 2014
filename = ['g' num2str(i) '.jpg'];
Image Analyst
Image Analyst on 7 Mar 2014
"image" being the actual variable name (which hopefully is not image which is the name of a built-in function).

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!