EDIT: Issues resolved by restarting my Matlab GUI.
I was testing my code and ran it multiple times. Without any change in the code, one time I ran it I was presented with an array of errors. Here is the error:
warning: load_path: ./lib/jsonlab: No such file or directory
warning: load_path: ./lib: No such file or directory
warning: load_path: ./lib/jsonlab: No such file or directory
warning: load_path: ./lib: No such file or directory
warning: load_path: ./lib/jsonlab: No such file or directory
warning: load_path: ./lib: No such file or directory
error: 'linearRegCostFunction' undefined near line 1 column 8
And the function declaration at line 1:
function [J, grad] = linearRegCostFunction(X, y, theta, lambda)
And, finally, the command I entered:
[J g] = linearRegCostFunction(X, y, theta, 7)
Thanks in advance for any potential help!