MATLAB1

From SourceWiki
Jump to navigation Jump to search

An Introduction MATLAB

Introduction

Rather than re-invent the wheel, we'll use some tried and tested tutorial material. The following notes from the Maths department at the University of Dundee are concise, comprehensive, but also easy to read: http://www.maths.dundee.ac.uk/ftp/na-reports/MatlabNotes.pdf


Hints and Tips on Performance

  • Replace your loops with vectorised operations, e.g.

replace:

for i = 1:length(vec)
  vec(i) = vec(i) * 3;
end

with:

vec = vec*3