function main S = 1; c = -1.25; Pr = 0.7; n = -0.8; x = [3 -1]; x1 = fsolve(@solver, x); function F = solver(x) [t, u] = ode45(@equation,[0,5], [S, c, x(1), 1, x(2)]); F = [u(end, 2)-1 u(end, 4)]; figure(1) plot(t, u(:,2)); hold on end function dy = equation(t, y) dy = zeros(5,1); dy(1) = y(2); dy(2) = y(3); dy(3) = y(2)^2 - y(1) * y(3) - 1; dy(4) = y(5); dy(5) = Pr * (n * y(2) * y(4) - y(1) * y(5)); endend
MATLAB: BVP PROBLEM how can we take ‘c’ in x-axis(continuous range.[-1.3:0.02:-1.1]) and to find f”(0)
in this bvp code how can we take 'c' in x-axis(continuous range.[-1.3:0.02:-1.1]) and what is the code to find f"(0)
Best Answer