clc; clf; clear; x =0:0.01:3; y = funcion_rectangular(x); plot(x,y,"r","linewidth",2); grid on; xlabel("Eje X","fontsize",16); ylabel("Eje Y","fontsize",16); f = @funcion_rectangular; q = quad (f, 0, 3); text(0.1,1.5,["integral = " num2str(q)],"fontsize",20); fprintf("Integral de funcion rectangular = %f\n",q);