% Template for submitting AMATH3132 hws % Dr. J. Alam, January 2009. function amath3132hw % Student information disp(' ------------ My Information ------------ ') % Please enter your information here Name = 'Issac'; Surname = 'Newton'; ID = 123456789; fprintf(' Student: %s %s (ID: %d) \n', Name, Surname, ID); disp(' ------------------------------------------------ ') disp(' ') disp('Hit enter to proceed') pause clear all; close all; disp(' ---------- Solution to Question #1 ---------- ') disp(' ') % Insert here your solution to Question #1 %this is how you may ask the user to select an input. n=input('Please enter a value for n ='); prob1(n) disp(' ') disp(' ------------------------------------------------ ') disp(' ') disp('Hit enter to proceed to next question') pause disp(' ---------- Solution to Question #2 ---------- ') disp(' ') % Insert here your solution to Question #2 disp(' ') disp(' ------------------------------------------------ ') disp(' ') % Please copy as many headers as necessary % define all local functions below % you may have one function for each problem function prob1(n) disp('Problem 1') disp('---------') fprintf(' Input: n = %d \n',n) fprintf('Print sin(x)') x=linspace(0,2*pi,n); y=sin(x); plot(x,y,'x--');