how to do same calculation for diffrent selected file
조회 수: 1 (최근 30일)
이전 댓글 표시
i have more than 50 .txt files , and each txt file contains some numerical values, and from that numerical values i have to do some calculation and have to find the result, the calculation part is already done, i am using 'uigetfile' to browse the files, the code is perfectly working when i select one txt file. but the problem is that i want to display the results for all file by selecting all file(ctrl+A)...i need a loop program through which selected files are execute automaticallyone by on..... some of my codes are here
folder_with_data = 'C:\Users\Parag\Desktop\newfof2\files';
file_path = uigetfile(fullfile(folder_with_data, '*.txt'), 'MultiSelect', 'on'); % browse for files
data = importdata(file_path); % Load the data
mkdir('C:\DeitY-SAMEER pjt_sankar\F2 and F1');
[pathstr,name,ext,versn] = fileparts(file_path);
dt=strcat('Date-',name(1:2),'/',name(4:5),'/',name(7:8));
tm=strcat('Time-',name(10:11),':',name(12:13),' ','LT');
idr=data;
Fr=idr(:,1);
Hr=idr(:,2);
Ar=idr(:,3);
Fr=Fr./1000000;
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!