|
1) Final Project grades as well as FINAL GRADES are
now posted please go over them and make sure they are correct.
2) The supplementary m-codes
are posted in the course outline page.
3) Dear students the Final
project is posted. Good luck.
4) Connect here to the course forum:
Since there have been problems
with links, just copy the address:
http://groups.google.com/group/weizmannmatlabfall2012a?hl=en
5) You can submit exercises in pairs.
6) HW5 is now published.
7) Please check your grades on the menu bar on
the left.
8) Dear students the grades you received on your
HW can be appealed if you think points were taken off by mistake or
miscalculated. We rarely accept appeals on how much was taken off. How many
points to take off is at the discretion of the HW
checker.
9) Ariel has opened a discussion group on google
weizmannmatlabfall2012a@googlegroups.com
10)
Yuval Hart reminds you to read the slides before the tutorial so that
there will be more time to discuss HW in the tutorial.
11)
Dear Students: the course this year is
graded as a pass/fail.
12)
The course is labor intensive.
13)
Pass grade is >85.
14)
The course is aimed at the beginners’ level,
however, some statistical and mathematical knowledge of Fourier series will
be required for one or two HW assignments. Help will be fully provided by
course staff for those who need it.
15)
In unusual cases (miluim, hospitalization,
sickness etc.) a student is entitled for only ONE resubmission of homework assignment and that should be
within one week of the original submission date of the assignment.
|
Instructions for Homework
Submission Guidelines
General
- Each ex
has its own specific instructions that you have to follow
- Name your script "hwX_<your ID
number>.m". X is the ex number (hw2_4363265.m for example).
·
Submit this script to the grader’s e-mail
address that is specified in the ex itself. All questions should be
referred to this address only. Do not send any e-mails regarding this ex to
any other e-mail address.
·
The mail should contain
a single m file only, and the words 'matlab
intro X' in its subject
·
If you have more than a
few questions regarding the ex, please come to the reception hour.
·
The script must execute
fluently without any errors or warnings.
Submitting a program that crashes– will grant you with failing
grade.
Script Structure
·
In some ex there might
be “open questions” – that the solution for them is not a matlab code. Please
answer them in the proper location in the m file as documentation.
·
The m file structure is specified in the example in appendix A. Each
script starts with the header : “%HWX _<ID>
<Student Name>”. The main questions are separated with question
headers (starting with ‘%% ’). The sub questions are separated in
documentation lines(starting with ‘%’).
- Please note that each main question
headers start with two percentage characters followed by a whitespace
character followed be the question header itself. This is important in
order for matlab to recognize this part as a
new code section .
- Name your variables with meaningful
names, not just “a”.
- All the numbers in the script
should be in a separate section in the script before the code itself,
as in appendix A, not throughout the code itself (about magic numbers)
Display
·
Do not display to the screen
things that you were not asked to. Use semicolon(‘;’)
at the end of lines in order to suppress unwanted output.
·
All screen display
should be done through “disp” which receives
numeric or text .
Html
·
It is highly recommended
(although not obligatory) to check your solution using html output. It is a
nice way to view the code combined with the figures and output. If your
script is correct , the html should work fluently.
You can create this output by executing the command publish(‘<script
name>.m’); This command will create a html file out of your script
output, that contains your code, your documentation, display and figures.
All the content is separated by the main questions.
·
You can access this file using your web
browser.
·
Please make sure that
everything that you are asked to do (questions, figures etc.) appear in the
html file.
Matlab Help
·
If you want to learn about a new matlab
function – type help function or doc function. Alternatively – search in mathwork website.
·
The easiest way is just
to use google – for example google
“matlab cos” and the
first result will be the mathworks help for the
function cos.m
·
A nice toturial (with many helpful others) may be found in youtube: http://www.youtube.com/watch?v=f1pzVW71rLI
Appendix A: answer
file structure example
%HW18
_314159265 Michael Scott
%variables
velocity = 40;
strains_num = 100;
samples_num = 14;
%% question
1
% 1.1 short documentation
of question 1.1
%The answer
is 42
matlab code….
% 1.2 short
documentation of question 1.2
matlab code….
%% question
2
%2.1 short documentation of question 2.1
matlab code….
Appendix B:
Formatted string – sprintf.
Suppose we have a variable n and we want to display :
n=<value of n>
Bad example 1 : (taken from the
solutions…)
disp(['n=',num2str(n)])
Bad example 2 : (taken from the
solutions…)
disp('n=');
disp(n);
The correct way to do so is to create a formatted string
(string = text):
s= sprint(‘n=%d’,n);
disp(s);
The sprintf function have special characters that
refers to input type that wil come later:
%s – a string (that will be specified later)
%d – a number (that will be specified later)
Example – including text and numeric variables in a
string
myName = 'Ariel';
myAge = 28;
s = sprintf('My name is %s , Im %d years old',myName,myAge);
disp(s);
Note that the order of variables should match the order
of the special characters (try to run the same script, but switch the order
myAge and myName and see what happens)
Another feature of sprintf is
spacing - You can enter new line
(\n) and tabs (\t) in the text (without specifying variables)
s = sprintf('My name is\t%s, \n Im\t%d years old',myName,myAge);
disp(s);
|