% plotting t=linspace(0,10,100); y=sin(t); z=cos(t); subplot(1,2,1); plot(t,y) subplot(1,2,2); plot(t,z) subplot(1,2,1); hold on; plot(t,z); hold off; % symbolic calculations syms x y % created symbolic variables x and y int(x^2) % indefinite integral int(sin(x),0,1) % definite integral diff(exp(x*y^2),x) % partial differentiation of a function w.r.t x syms s t laplace(sin(t)) % Laplace transform ilaplace(1/s^2) % Inverse Laplace transform % example of m-file program clear; % clear all variables G=[0;2]; H=[1 0]; J=0; a=[0.1 0.5 1 10]; % vector of different parameter values for i=1:4 F=[0 1;-2 -a(i)]; % matrix F depends on parameter a subplot(2,2,i); % for each "a" defined above (i.e. 0.1,0.5,1,10) step(F,G,H,J,1,10); % we evaluate F and then plot a step response end % in 4 plots, separate plot for each parameter value