Running a loop of inputting tables into MatLab
Hi, I have this code:
[data]=loadScopeData(‘/Volumes/usb/table_5.csv’,[1,inf]);
max_col2_5=max(data.pvdf_v)
max_col3_5=max(data.cell_v)
and I have tables for each trial 5-40 and I was wondering if there was a way that I could run this in a loop so import each table (table_5, table_6, table_7…), and to find the max of each of the second two columns labeled (max_col2_5, max_col2_6, max_col2_7…) matching the number of the table, so that I can later make a table out of these values. I have bolded the numbers that would need to increase by one each time, the rest of teh script would stay the same. I am thinking that a while loop could work for this, but I’m not sure how I can integrate that into the file name when loading the data. Turning this into a loop would be a lot faster and easier to run that having this script for each trail, especially as I start doing more. Thanks.Hi, I have this code:
[data]=loadScopeData(‘/Volumes/usb/table_5.csv’,[1,inf]);
max_col2_5=max(data.pvdf_v)
max_col3_5=max(data.cell_v)
and I have tables for each trial 5-40 and I was wondering if there was a way that I could run this in a loop so import each table (table_5, table_6, table_7…), and to find the max of each of the second two columns labeled (max_col2_5, max_col2_6, max_col2_7…) matching the number of the table, so that I can later make a table out of these values. I have bolded the numbers that would need to increase by one each time, the rest of teh script would stay the same. I am thinking that a while loop could work for this, but I’m not sure how I can integrate that into the file name when loading the data. Turning this into a loop would be a lot faster and easier to run that having this script for each trail, especially as I start doing more. Thanks. Hi, I have this code:
[data]=loadScopeData(‘/Volumes/usb/table_5.csv’,[1,inf]);
max_col2_5=max(data.pvdf_v)
max_col3_5=max(data.cell_v)
and I have tables for each trial 5-40 and I was wondering if there was a way that I could run this in a loop so import each table (table_5, table_6, table_7…), and to find the max of each of the second two columns labeled (max_col2_5, max_col2_6, max_col2_7…) matching the number of the table, so that I can later make a table out of these values. I have bolded the numbers that would need to increase by one each time, the rest of teh script would stay the same. I am thinking that a while loop could work for this, but I’m not sure how I can integrate that into the file name when loading the data. Turning this into a loop would be a lot faster and easier to run that having this script for each trail, especially as I start doing more. Thanks. loop, data import MATLAB Answers — New Questions