# How can I calculate unknown parameters in a integration with given boundary conditions

1 view (last 30 days)

Show older comments

Hi I am trying to calculate unknown parameters in a integration with given boundary conditions. The integration and boundary conditions are shown below:

a11-a23 are the six unknown parameters to be calculated. z1 is a known vector when t=1 (I can give z2, z3... if needed).

The x could be discretized and thus the z1 can be a known vector constant.

I am trying to use integration (int in matlab) to represent z(x,t) for a given x (e.g. x=-1.5:0.1:1.5) and then use fmincon to find a11-a23 to make modulus of (Z(x,t)-z1) the minimum. However, the calculation of the integration is super time-consuming.

c=0.011;

syms x t a1 a2 a3 a4 a5 a6

a=[a1 a2 a3 a4 a5 a6];

x=-1.5:0.1:1.5;

Er=@(t)-(a(1)+a(2)*exp(-t./a(3))).*(1-x.^2./(a(4)+a(5).*t-a(6).*t.^2).^2).^c;

intE=int(@(t)Er(t),t,0,1);

tt=1;% integration time

FEr=Er(x,t,a)

fun=@(t,a)(norm(int(Er,t,0,tt)-z1));

a0=zeros(6,1);

A=[];

b=[];

Aeq=[];

beq=[];

lb=[0,0,0,0,0,0];

ub=[1,1,10,1,1,1];

aa=fmincon(@(a)fun,a0,A,b,Aeq,beq,lb,ub);

Any ideas appreciated. Thank you in advance!

### Answers (1)

Walter Roberson
on 11 May 2020

### See Also

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!