Matlab
Matlab
% Assignment #2
%----------------------------------------------------------------------%%%
ENGINEERING MATHEMATICS IV - MATH 2Z03
%%%
Assignment #2
%%%
VECTOR FIELDS
%----------------------------------------------------------------------%----------------------------------------------------------------------% Covers:
% - "Advanced Engineering Mathematics" by D.G. Zill and W.S. Wright,
%
(Jones and Bartlett, 5th edition) Sections 9.1-9.3
%
% - "Numerical Mathematics" by M. Grasselli and D. Pelinovsky
%
(Jones and Bartlett, 2008), sections 7.4-7.4
%----------------------------------------------------------------------% McMaster Policy on Academic Integrity:
% ======================================
% You are expected to exhibit honesty and use ethical behaviour in all
% aspects of the learning process. Academic credentials you earn are
% rooted in principles of honesty and academic integrity.
%
% Academic dishonesty is to knowingly act or fail to act in a way that
% results or could result in unearned academic credit or advantage. This
% behaviour can result in serious consequences e.g., the grade of zero
on
% an assignment, loss of credit with a notation on the transcript
% (notation reads: "Grade of F assigned for academic dishonesty"),
and/or
% suspension or expulsion from the university. It is your responsibility
% to understand what constitutes academic dishonesty. For information
% on the various types of academic dishonesty, please refer to the
Academic
% Integrity Policy, located at:
%
www.mcmaster.ca/academicintegrity
%
% The following illustrates only three forms of academic dishonesty:
%
1) Plagiarism e.g., the submission of work that is not ones own or
%
for which other credit has been obtained.
%
2) Improper collaboration in group work.
%
3) Copying or using unauthorized aids in tests and examinations.
%----------------------------------------------------------------------% Instructions:
% - Upload your assignment electronically using the web address
%
provided on Avenue (you can log in using you MacID and following the
%
instructions on the log-in screen). Please note that:
%
* you can submit your Matlab assignment a maximum of 5 times and
%
only your most recent submission will be marked,
%
* the file submitted must have extension ".m",
%
* a confirmation Email will be sent to your McMaster Email address
%
and to any other address you provide during submission;
%
please check this message to make sure the correct file has
%
been submitted.
% - It is obligatory to use the current MATLAB template file available
%
from the course website on Avenue to Learn
% - Failure to type fresh code into the template code result in
%
charges of academic dishonesty
%
submissions non compliant with this template will not be accepted.
% - Make sure to enter your name and student I.D. number in the
%
appropriate section of the template.
% - Late submissions and submissions which do not comply with
%
these guidelines will not be accepted.
% - All graphs should contain suitable titles and legends.
%----------------------------------------------------------------------%
%
COPYING CODE FROM ANY OTHER STUDENT IS AN ACT OF ACADEMIC DISHONESTY
%
AND WILL BE DEALT WITH IN KEEPING WITH THE POLICIES OF THE
UNIVERSITY
%
%----------------------------------------------------------------------% Adapted from code written by Vladislav Bukshtynov
clc; close all; clear all;
% Student information
disp('
------------
Student Information
------------
')
disp('
disp('
disp('
disp('
disp('
Student:
-----------------------------------------------')
')
')
')
')
contourf(x,y,z,20);
colorbar
colormap('default')
title('figure(1)')
hold on
disp('
disp('
disp('
disp('
disp('
disp('
')
-----------------------------------------------')
')
')
')
')
disp('
disp('
disp('
disp('
disp('
disp('
')
-----------------------------------------------')
')
')
')
disp('
disp('
disp('
disp('
disp('
disp('
')
-----------------------------------------------')
')
')
')
----------
')
')
')
')
disp('
disp('
disp('
disp('
disp('
disp('
')
-----------------------------------------------')
')
')
')
disp('
disp('
disp('
disp('
disp('
disp('
')
-----------------------------------------------')
')
')
')
disp('
disp('
disp('
disp('
disp('
disp('
')
-----------------------------------------------')
')
')
')
disp('
----------
Answers
----------
')
')
')
')
')
')
disp(' ')
% DO NOT TOUCH THIS PART (RESERVED FOR THE INSTRUCTOR'S USE)
Name
Surname
ID
Answer1
Answer2
Answer3
% End of Assignment #2