%% ecc diff lineales clearvars; close all; clc; %% definimos variables t = 0:0.1:5; N = length(t); %constantes C = 3; yc = C*exp(-t); yp = 1 - t; y = C*exp(-t) + 1 - t; figure(1) plot(t,yc); title('solución complementaria'); xlabel('t (s)') ylabel('y_c(t) (m)'); legend('y_c(t)'); grid on; box on; figure(2) plot(t,yp); title('solución particular'); xlabel('t (s)') ylabel('y_p(t) (m)'); legend('y_p(t)'); grid on; box on; figure(3) plot(t,y); title('solución'); xlabel('t (s)') ylabel('y(t) (m)'); legend('y(t)'); grid on; box on; figure(4) plot(t,y, t,yc, t,yp); title('solución'); xlabel('t (s)') ylabel('y(t) (m)'); legend('y(t)','y_c(t)','y_p(t)'); grid on; box on;