This is what I have and it finds the correct rows but it is not creating a new table with the extracted values. It produces a 1×1 table. I am not sure what I am missing.
load Leaf1.txt;% % Set data source
Wave = Leaf1(:,2);Ref = Leaf1(:,3);% % Locate data
R = find(Wave >= 625 & Wave <= 691)NIR = find(Wave >= 829 & Wave <= 900);% Create new matrix
New = Leaf1([276:342 2427:2493 4578:4644 6729:6795 8880:8946 11031:11097 13182:13248 15333:15399 17484:17550 19635:19701 480:551 2631:2702 4782:4853 6933:7004 9084:9155 11235:11306 13386:13457 15537:15608 17688:17759 19839:19910]);% % Save new table
Ref_Leaf1=table(New);writetable(Ref_Leaf1);
Best Answer