How do I get a numeric integral from a function that uses Excel file input data?

mozhgan sh on 12 Sep 2019
Latest activity Reply by Fulden Buyukozturk on 17 Sep 2019

Hi, How do I get a numeric integral from a function that uses Excel file input data? I have been able to import the excel file but am having trouble continuing the code,please guide me, thank you

Fulden Buyukozturk
Fulden Buyukozturk on 17 Sep 2019

Hi, is your equation implemented in SimBiology or are you trying to do this in base MATLAB?

Sietse Braakman
Sietse Braakman on 12 Sep 2019

What would you like to use the numerical integral for? If you'd like to do non-compartmental analysis, you can open the dataset in SimBiology, navigate to the "Define Plot" tab, click Open --> NCA. In MATLAB, you could use the function trapz with input arguments time and data.

Non compartmental analysis

trapz function

On a logistical note, do you mind posting any further questions you might have to the Answers section of our community website rather than the Discussion section? Thanks!

mozhgan sh
mozhgan sh on 12 Sep 2019

Thanks for answering But I didn't mean that. I have a function that depends on the numbers in the excel file for example int ( f(r) r^6 dr) f(r)=ro /roc roc= constant ro= from excel file r= from excel file

Arthur Goldsipe
Arthur Goldsipe on 12 Sep 2019

Did you read all of Sietse's reply? You posted your question on a site intended for discussions about SimBiology. Your question is more appropriate (and is more likely to get a helpful response) on MATLAB Answers .

P.S. Like Sietse, my first suggestion would be to use trapz. If that isn't helpful to you, I recommend clarifying what you need in more detail when you post your question on MATLAB Answers.

Tags

No tags entered yet.