Error in blastscript2_halland (line 60)

1 view (last 30 days)
Running into a problem running this script in MATLab 2014a. I didn't write the script but have been told to apply. Purpose is to compare peak values pre-, 1d and 7d post-event between two subjects. The correlation coefficients are plotted, then the cross-correlation coefficients are plotted in a probability vs CxC histogram.
I placed the data into the workspace--changed the directory--ran the script but the output and get this output:
Undefined function 'histogram' for input arguments of type 'double'.
Error in blastscript2_halland (line 60) histogram(cxc{j},hbin,'Normalization','probability');
Any help appreciated, picture of script attached

Accepted Answer

dave Johanson
dave Johanson on 6 Mar 2015
you are correct sir, I have windows matlab version 2014a and the script was generated on a mac matlab version 2015.

More Answers (1)

Geoff Hayes
Geoff Hayes on 6 Mar 2015
Edited: Geoff Hayes on 6 Mar 2015
Dave - which version of MATLAB are you using? In the Command Window type
ver
and observe the result. The function histogram appears to have been introduced in R2014b. If you have an earlier release, you will have to modify the above code to make use of the hist function.
If you have (at least) R2014b, then type the following in the Command Window to find where in the MATLAB search path this function resides
which histogram -all
though I suspect that you won't find this file.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!