[Matplotlib-users] Request for help with a code

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 np
import matplotlib.pyplot as plt
from 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