Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Andrew Amoateng-Agyemang
Andrew Amoateng-Agyemang le 9 Avr 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by