User talk:Ray USC

Hi Everybody,

I create Mask from multible images. tiff so I want to save output images.tiff in same name of the original images. suppose the names of files are 1981_07_15.n07-VI3g and 1982_07_16.n07-VI3g respectively SO how can I save outputs in same names of inputs.

Thank you in advance

Reyadh

Here is my code

cd G:\marsh\new F_read=dir('*.tif'); for i=1:2 I{i}= F_read(i).name; I{i} = imread(I{i}); ID{i}= im2double(I{i}); Ii{i}= ID{i}(697:709,2728:2735); Ii{i}(Ii{i}>1)=NaN; Ii{i}(Ii{i}<0)=NaN; Ii{i}(Ii{i}==0)=NaN; end for i=1:13 lt(i)=32.01-0.0833*(i-1); end clear i for i=1:8 lg(i)=47.09+0.0833*(i-1); end clear i cd F:\Landsat_images\All_marshes_Calssification\Alhuwaiza\Mask_Tif M=m_shaperead('Huwaiza'); %Create a mask x = linspace(min(lg), max(lg), 8); y = linspace(min(lt), max(lt), 13); [x,y] = meshgrid(x,y); for i=1:length(M.ncst) Ncst(i,1)=M.ncst{i}(1); Ncst(i,2)=M.ncst{i}(2); end isin = inpolygon(x,y,Ncst(:,1),Ncst(:,2)); isin=flipud(isin); isin=double(isin); isin(isin==0)=NaN; MASK=isin; clear isin x y %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cd G:\marsh\new\huTif_new for i=1:length(Ii) set(0,'DefaultFigureRenderer','zbuffer') [Plg,Plt]=meshgrid(lg,lt); LATLIMS=[30.952 32.01]; LONLIMS=[47.09 47.818]; m_proj('Equidistant Cylindrical','lon',LONLIMS,'lat',LATLIMS); img=Ii{i}.*MASK; map=m_pcolor(Plg,Plt,img); a=colormap(Jet); %     a=fliplr(a); set(gcf,'colormap',a); shading flat; m_grid('linewi',2,'tickdir','out'); str=num2str(i); saveas(map,str,'tif'); endRay USC (talk) 19:57, May 3, 2016 (UTC)

Welcome
Hi, welcome to ! Thanks for your edit to the User talk:Ray USC page. If you need help, read through our help pages or contact a local admin. If there are no active admins here, stop by Community Central and check out our forums.

Looking for live help? Then join us for an upcoming webinar to chat with staff and other Wikia editors. You can also check our Staff blog to keep up-to-date with the latest news and events around Wikia. Lastly, check out the Wikia Video Library, where you can find premium licensed videos to add to the wiki.

All of these links are a great way to start exploring Wikia.

Happy editing, Rappy 4187 (help forum | blog) 19:57, May 3, 2016 (UTC)