# assigning numerical values to variable

I have a csv data file, has two columns of data. First column denotes time (t) and the corresponding value in the second column is flow rate (f). I would like to assign these values to an array f[t], to use in numerical solution of a differential equation (NDSolve[ ]).

Thanks and Regards

• Interpolation[data]? Assumes data is in the form {{t1, f1}, {t2, f2},...}. – Michael E2 Mar 6 '18 at 12:34
• yes, exactly in this form, {{t1, f1}, {t2, f2},...} – Anand Mar 6 '18 at 12:35
• Do not forget to first import it: data=Import["FullPathToTheFile.csv"] and then use the advice of Michael. – Alexei Boulbitch Mar 6 '18 at 13:15
• Thank you Michael E2 for the suggestions....It worked... – Anand Mar 6 '18 at 14:41
• @Anand do you want to post your own complete solution is a way that could help other people? As you receive you can give back! As you gain reputation you can vote and answer questions. Keep the site useful, be kind, correct mistakes and share what you have learned. – rhermans Jun 28 '18 at 22:13