Is it possible to get the value of 'A' in a table format of 11x4 dimension
조회 수: 1 (최근 30일)
이전 댓글 표시
function main
format long
Pr=0.72;
xa=0;xb=2;
solinit=bvpinit(linspace(xa,xb,11),[0 0 0 1 0]);
sol=bvp4c(@ode,@bc,solinit);
x=linspace(xa,xb,11);
sxint=deval(sol,x);
f0 = deval(sol,0);
P=f0(3);,Q=f0(5);
f=x.^2*(P/2)+x.^5*(P^2)/120-x.^3*(1/6)-x.^4*(Q/24)-x.^8*(P^3)*(13/40320)+x.^7*(P*Q)/1008+x.^7*(Pr*P*Q)/1680+...
x.^11*(P^4)*(229/13305600)-x.^10*(P^2)*Q*Pr^2*(1/40320)-x.^10*(P^2)*Q*Pr*(37/1209600)+...
x.^9*(P^2)/20160-x.^10*(P^2)*Q/22400-x.^9*(Pr*Q^2)/120960-x.^8*Q*Pr/13440+x.^8*Q/8064+x.^9*Q^2/72576;
g=1+x.*Q-x.^4*Pr*P*Q/8+x.^7*P^2*Q/56-x.^10*P^3*Q*Pr*(13/1209600)-x.^9*P*Pr^2*Q^2*(19/13440)-...
x.^8*P*Q*Pr^2/128- x.^9*P*Pr*Q^2/24192;
function res=bc(ya,yb)
res=[ya(1); ya(2); yb(2); ya(4)-1; yb(4)];
end
function dydx=ode(x,y)
dydx=[y(2); y(3); -3*y(1)*y(3)+2*y(2)^2-y(4); y(5); -3*Pr*y(1)*y(5)];
end
A = [x; sxint(4,:);g;E2]';
end
%%% Is it possible to get the value of 'A' in a table format of 11x4 dimension
댓글 수: 12
Walter Roberson
2019년 5월 1일
Coefficient may be approximate. You can estimate the degree by looking at the number of leading coefficients that are approximately 0. You can also estimate by starting with a high degree fit and extracting the coefficient mentioned and then reducing the degree and examining again. When the coefficient changes drastically then you have gone one step too far.
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!