Hi, anybody can help me from this code,
I want to save all peaksnr output into one .csv using writematrix, but this code only save one value into the .csv.
Is there any method i can use to make sure all the output save into one csv.
%% Here is my code indir = uigerdir(cd, 'Select input folder'); directory = dir([indir, '\', '*.jpg']); for i = 1 : length(directory) filename = directory(i).name; ref = imread([indir, '\', filename]); A = imnoise(ref, 'salt & pepper', 0.02); [peaksnr, snr] = psnr(A, ref); fprintf('\n Peak-SNR Original : %0.4f',peaksnr); fprintf('\n SNR Original : %0.4f \n',snr); writematrix(peaksnr, sprintf('psnrO.csv',i+1)) end
Thank you for your help.
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
But, i've tried another solution an work for me as well.
indir = uigetdir(cd, 'Select input folder'); directory = dir([indir, '\', '*.jpg']); for i = 1 : length(directory) filename = directory(i).name; ref = imread([indir, '\', filename]); A = imnoise(ref, 'salt & pepper', 0.02); [peaksnr, snr] = psnr(A, ref); fprintf('\n Peak-SNR Original : %0.4f',peaksnr); fprintf('\n SNR Original : %0.4f \n',snr); writematrix(peaksnr,'psnrO.csv
SEE COMPLETE ANSWER CLICK THE LINK
Comments
Post a Comment