The code you provided looks valid, but the error might have occurred because of the typo in the variable name. Please make sure that the variable name is defined in the workspace and spelled correctly.
Try the modified code below:
main.m66 chars3 lines
If this is a problem with the data file, make sure that you have the correct file path and the file is in the correct format to be read by MATLAB.
gistlibby LogSnag