Hi,
As per my understanding you want to know how to plot the polynomial equations for all the plots in the figure simultaneously without using the "tool" menu in figure window. Also, you want to know how to extract the polynomial equation from the plot.
Extract the coefficients of the fitted polynomial equation using "polyfit" function as shown in the code below.
coeffe = polyfit(In,e,6);
Refer to the documentation link to learn more about "polyfit" function.'
Then use the "polyval" function to generate the fitted curve.
xIn = linspace(In(1),In(end),100); % time steps to plot the smooth curve
polye = polyval(coeffe,xIn);
Refer to the documentation link to learn more about "polyval" function.'
Plot the generated polynomial in the corresponding subplot.
subplot(2,2,2);plot(In,e); hold on;
plot(xIn,polye); hold off;
grid on;axis tight;
title('Indicatiile manometrului In in functie de eroarea realtiva e');
xlabel('valorile manometrului de masura In [N/m^2]');
ylabel('eroarea relativa e [%]');
legend('f(In)');
Follow the same steps for all the four plots.
Use the "poly2sym" function to extract the equation in symbolic form and use and "pretty" function to display the equation. Refer to the code below.
eqn_e = poly2sym(coeffe)
pretty(eqn_e)
Refer to the documentation to learn more about "poly2sym" function.
Refer to the documentation to learn more about "pretty" function.
Hope it helps!