Currently the code I have is: file_address = 'C:\Users\Desktop\.....\1.5step 45mins\run 51 extracted from labspec\'
x_grid = [0:1:1];
y_grid = [0:1:5];
run_name = 'run51__'
x_size = length(x_grid);
y_size = length(y_grid);
x_y = x_size*y_size;
output = zeros(x_y, 2);
for i = 1:x_size
for j = 1: y_size
run_number1 = strcat(num2str(a(i)),'_',num2str(b(j)));
run_number2 = strcat(run_name,run_number1);
address = strcat(file_address,run_number,'.txt'); %address 'C:\Users\....\..\..\run27_0_0.txt
run = (dlmread(address)); %open and read run27_0_0.txt
wavenumber = run(:,1);
intensity = run(:,2);
pIind = find(peakI);
basically I want to extract per dlmread a matrix with [run_number1 peak_wavenumber peakI]
Any help would be greatly appreciated. I cant seem to get the syntax right for the nested for loop.
output(i,j) = output(run_number1 peak_wavenumber peakI)????
(I appreciate it is not indented properly here)