Skip to content

Instantly share code, notes, and snippets.

@shimondoodkin
Last active October 30, 2015 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shimondoodkin/3d0ffc7d3ca0a4ffb3a6 to your computer and use it in GitHub Desktop.
Save shimondoodkin/3d0ffc7d3ca0a4ffb3a6 to your computer and use it in GitHub Desktop.
while learning machine learning i have noticed a very quick and efficient way to learn matlab syntax.

from https://www.coursera.org/learn/machine-learning/supplement/Mlf3e/more-octave-matlab-resources

More Octave/MATLAB resources

Octave Resources At the Octave command line, typing help followed by a function name displays documentation for a built-in function. For example, help plot will bring up help information for plotting. Further documentation can be found at the Octave documentation pages.

MATLAB Resources At the MATLAB command line, typing help followed by a function name displays documentation for a built-in function. For example, help plot will bring up help information for plotting. Further documentation can be found at the MATLAB documentation pages.

MathWorks also has a series of videos about various MATLAB features:

##Introduction to MATLAB

Learning Module - Learning Goals

##Vectors

Learning Module - Learning Goals

##Visualization

Learning Module - Learning Goals

  • Line Plots - Create a line plot of a vector and customize plot markers and colors
  • Annotating Graphs - Label axes, add a title, and add a legend to a plot

##Matrices and Arrays

Learning Module - Learning Goals

##Programming

Learning Module - Learning Goals

  • Using the MATLAB Editor - Write a script in the MATLAB Editor, break code into sections to execute, and find help on functions
  • Logical Operators - Use relational and logical operators to create logical variables for program control
  • Conditional Data Selection - Access and change elements for a vector the meet a specified criteria
  • If-Else Statements - Use if-else statements to control which lines of code are evaluated
  • For Loops - Repeat a sequence of commands a specified number of times
  • While Loops - Repeat a sequence of commands while a specified condition is true

Debugging:

If your code runs but gives the wrong answers, you can insert a "keyboard" command in your script, just before the function ends. This will cause the program to exit to the debugger, so you can inspect all your variables from the command line. This often is very helpful in analysing math errors, or trying out what commands to use to implement your function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment