function [a,b,s] = example_function(a, b) % % example to illustrate MATLAB functions. % This function takes 2 input numbers, squares them, and adds the result. % a = a.^2; b = b.^2; s = a + b; disp(['a is ' num2str(a) ', b is ' num2str(b) ', s is ' num2str(s)]);