0
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ Interpolation[data]? Assumes data is in the form {{t1, f1}, {t2, f2},...}. $\endgroup$ – Michael E2 Mar 6 '18 at 12:34
  • $\begingroup$ yes, exactly in this form, {{t1, f1}, {t2, f2},...} $\endgroup$ – Anand Mar 6 '18 at 12:35
  • $\begingroup$ Do not forget to first import it: data=Import["FullPathToTheFile.csv"] and then use the advice of Michael. $\endgroup$ – Alexei Boulbitch Mar 6 '18 at 13:15
  • $\begingroup$ Thank you Michael E2 for the suggestions....It worked... $\endgroup$ – Anand Mar 6 '18 at 14:41
  • $\begingroup$ @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. $\endgroup$ – rhermans Jun 28 '18 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.