[Matplotlib-users] Request for help with a code

Swayam Sahoo swayam14 at gmail.com
Sat Oct 26 07:42:06 EDT 2019


Hi ,
  I am in need of a help to I want to curve fit with two independent
variables: Tag and Tau . I tried inputting variables with tuple but it did
not work. I would be grateful if you could assist me in this regard. Here
is my code:

import numpy as npimport matplotlib.pyplot as pltfrom scipy.optimize
import curve_fit

This is my model :

def concentration(T,a,b,c,d):
    (Tag,Tau)=T
    return np.exp(a-d/Tag)/(np.exp(a-d/Tag) +np.exp(b-c/Tau))

Here I use a variable T which is a combination of two independent variables
Tag and Tau. The output that I wish to fit is concentration.

T=[(7.9481e-04,5.9061e-04), (7.64438e-04,6.1231e-04),
(7.64438e-04,6.04905e-04), (7.85453e-04,6.01268e-04) ]
experimental_concentration = [0.5428,0.798,0.75,0.70]


many thanks,
Swayam
-- 
*Swayam Prakash Sahoo*
Universität Stuttgart
Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20191026/ce8fb4db/attachment-0001.html>


More information about the Matplotlib-users mailing list