I have a csv file in with these column
column1 column2 column3
1 2 3
and G.Edges in this format
1 2 3 4
EndNodes Weight Name Distance
what I would like to do is read the grocerydb.csv file and add all the data in column2 of the csv file to column 5 of G.Edges
i tried this code
fid = fopen('grocerydb.csv');
productUPC = textscan(fid,1);
productName = textscan(fid,'%s',2);
fclose(fid);
but it reads the second row not the column. I have review some answers to similar questions such as this Reading specific column from CSV file in matlab. which gave instruction for rows, what I want is a column data not row
how can i implement reading the second column and add it to G.Edges?