Where are the functions fpval and chi2pval in the builtin function canoncorr.m
4 views (last 30 days)
Show older comments
I am using the standard Matlab function canoncorr.m to calculate canonical correlations between two large data sets. However, I get error messages on lines 145 and 149. This error also appears with basic random 3x9 matrices for both x and y.
line 145: stats.pF = fpval(stats.F, stats.df1, stats.df2);
line 149: stats.pChisq = chi2pval(stats.chisq, stats.df1);
they both throw an error of "function not defined for argument of type double"
then if I search for them or try to find help files I get "function not found" errors.
I fear the files were overwritten but I cannot even seem to find them on other computers with matlab in order to replace them on my machine.
Perhaps parts of my path were inadvertently deleted?
Does anyone know the location of these built in files? Any help would be greatly appreciated.
0 Comments
Accepted Answer
Star Strider
on 7 Aug 2014
They may have been overshadowed with other functions or variables with the same names, but you likely didn’t delete them.
In the Command Window, type:
which fpval -all
which chi2pval -all
I get as the result:
C:\Program Files\MATLAB\R2014a\toolbox\stats\stats\private\fpval.m % Private to stats
C:\Program Files\MATLAB\R2014a\toolbox\stats\stats\private\chi2pval.m % Private to stats
If you get more than that (for the MATLAB version you have), you need to track down the shadowing variables or functions and rename them. It’s probably best to do this just after you get the error, with any potentially problematic functions or variables still in your workspace so you can detect them.
2 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!