MATLAB: How to fix the following code

histogram

>> filename = load('proctrial_1.lvm'); >> timedata = filename(:,1); >> xvoltage = filename(:,2); >> plot(timedata,xvoltage) >> histplot = histogram(timedata, xvoltage); which gives an error, Undefined function 'histogram' for input arguments of type 'double'.

Best Answer

The function's name is "hist" for plotting and "histc" for only getting the values.