Where are the functions fpval and chi2pval in the builtin function canoncor

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.


Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

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




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.