What does this error for hist mean?
1 visualización (últimos 30 días)
Image Analyst el 5 de Nov. de 2016
In extractedge.m you're calling
something = hist(mean);
However there are two very bad things with that.
First, you have a script called hist.m and it's trying to call hist.m and pass it mean, but hist.m is a script, not a function so it cannot take any arguments.
Second, you're either passing the built-in mean() function to your script (bad, unless your m-file is a function that is expecting a function instead of a variable), OR you created a variable called mean, which is very very bad since that would blow away the built-in mean function.
Rename your hist.m to something like hist_test.m. And in extractedge.m do something like
thisMean = mean(someVector);
Now if you want to pass thisMean to hist_test.m, then you need to make hist_test.m a function instead of a script and you can do this by adding a function line with the name of the m-file. So the first line would be this:
% Then somehow do something with theMean in the function.