Hi, I am relative new in matlab. I never use solver and definite integration in matlab. Normally I will do it numerically in excel so I can control my data easily. But due to some circumtances, I need to do it in matlab. In this question, I try to reduce the matrix size so I can easily explain. my problem is as below
constants
As=[2094.4 3272.53 4105; 3272.53 3272.53 4105;]; %>> matrix size (n,m) where n=number of cases and m=number of possible As
d=[950 950 950; 933.33 950 950;]; %>> matrix size (n,m) where n=number of cases and m=number of possible As >> d is the position of As
P=[-499.8 -499.8; -1122 -1122; 1122 499.8;]; %>> matrix size (k,n) where k=number of considered P in a case and n=number of cases
fy=415; fcd=24/1.3; k1=0.85; es=fy/200000; B=1000; Ty=fy*As;
functions variable (x,ec_top)
- ec_top=x*es/(d-x)
- sigma(ec)=k1*fcd*(ec/0.002)*(2-ec/0.002) for 0<ec<0.002
- sigma(ec)= k1*fcd for 0.002<ec<0.0035
- sigma(ec)= 0 for else
- Cc=B*integral(sigma(ec),0,ec_top)
Equation
Ty-Cc=P
as we can see that function 1 is the correlation of variable x and ec_top, further ec_top is used as upper limit in integration to solve the equation.
I want to solve the equation for each k,n,m and what I care is the value of x where the size suposse to be [k,n,m]
or x1 [k,m] and x2 [k,m] for each case. either way is ok for me. please help
Best Answer