2 views (last 30 days)

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

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

Start Hunting!
## 12 Comments

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695754

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695754

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695755

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695755

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695842

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695842

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695845

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_695845

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699241

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699241

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699249

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699249

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699358

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699358

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699848

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699848

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699871

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699871

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699905

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699905

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699910

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_699910

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_700628

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/457265-is-it-possible-to-get-the-value-of-a-in-a-table-format-of-11x4-dimension#comment_700628

Sign in to comment.