Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How do you display the numerical outputs and inputs in the workspace in function file?

1 visualización (últimos 30 días)
I have a function with a vector output which I have a graphical solution to but I want to be able to see the numerical values at every point that the solution is evaluated at. How do I do this?
Here is the code:
function main
m = 0.0909; Ri = 0; Pr = 0.71; s = 0.3;
function res = bc(ya,yb)
res = [ ya(1)-2*s/(m+1); ya(2); ya(4)-1; yb(2)-1; yb(4)];
end
function dydx = coupled_falkner_skan(x,y)
dydx = [y(2); y(3); -y(1)*y(3)-(2*m/(m+1))*(1-y(2)^2)-(2/(m+1))*Ri*y(4)*cos(m*pi/(m+1)); y(5); -Pr*y(1)*y(5)];
end
xa = 0; xb = 3;
xint = linspace(xa,xb,1000);
solinit = bvpinit(xint,[2*s/(m+1) 0 0 1 0]);
sol = bvp4c(@coupled_falkner_skan,@bc,solinit);
Sxint = deval(sol,xint);
plot(xint,Sxint(2,:))
hold all
end

Respuestas (0)

La pregunta está cerrada.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by