I am trying to the row number of '3/8' in a column of text data (52x1) n
1 view (last 30 days)
Show older comments
Tube_data = readtable('Copper Tubes.xls');
Column_1 = Tube_data(1:52,1);
My_Tube_Type = '3/8';
n = 0;
for (i=1:52)
x = Column_1(i,1);
t = strcmp(x,My_Tube_Type);
if t == 1
n = i;
end;
end;
0 Comments
Answers (1)
DGM
on 27 Oct 2021
Tube_data = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/780803/Copper%20Tubes.xls');
Column_1 = Tube_data(1:52,1);
My_Tube_Type = '3/8';
rownum = find(strcmp(table2array(Column_1),My_Tube_Type))
Column_1(rownum,:)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!