Hi
I got the solution of nonlinear equation as followed;
>> syms f y_A0 y_B0 y_C0 P Tfor y_A0 = 0.5:0.1:0.9;y_B0 = 1-y_A0;y_C0 = 0;P = 2;T = 423;equation1 = (y_C0+f*y_A0)*(1-2*f*y_A0)^2/(y_A0-f*y_A0)/(y_B0-2*f*y_A0)^2/P^2 - exp(11454/T-28.36);equation2 = y_A0-f*y_A0 > 0 ;equation3 = y_B0-2*f*y_A0 > 0 ;equ = [equation1 equation2 equation3 ];solution = solve(equ,f);double(solution)endans = 0.1558ans = 0.1007ans = 0.0588ans = 0.0283ans = 0.0082
I want to plot the data of solution with respect to 'y_A0', but only data in last case (y_A0 = 0.9) is saved in the workspace.
I want to gather data in all cases (0.5<= y_A0 <= 0.9) and plot (solution, y_A0) to observe the change of solution with respect to y_A0
How can solve this problem?
I attached the mat. file
Best Answer