What does "Attempt to execute SCRIPT fitdist as a function" mean?

This is probably really simple, but I'm a beginner. Every time I try to use the histfit function in any script lately, I get the error message:
Error using histfit (line 69)
Attempt to execute SCRIPT fitdist as a function:
But I never have problems with regular hist or any statistic functions.
Is there something wrong with the way I'm importing data from text files?
Here's a smaller example of what I'm trying to do:
s=importdata('Data1.txt')
figure;
hist(s)
figure(2);
histfit(s)

2 件のコメント

dpb
dpb 2015 年 11 月 23 日
Looks like you've inadvertently created a script named fitdist.m that is aliasing the TMW function of the same name.
Type
which fitdist
at the command line to see what it is being resolved to. If it's something other than something like
C:\...\toolbox\stats\stats\fitdist.m
that's the problem; remove that file or rename it something not in conflict with Matlab function name if it's needed local content.
Stephanie Bass
Stephanie Bass 2015 年 11 月 26 日
Thank you, that was the exact problem

サインインしてコメントする。

回答 (0 件)

質問済み:

2015 年 11 月 23 日

コメント済み:

2015 年 11 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by