Unrecognized function (iforest) even though the toolbox is installed

Hi,
I'm trying to use the iforest function in matlab. I downloaded the Statistics and Machine learning Toolbox. I still get the following error message: Unrecognized function or variable 'iforest'. When I tried another function from the toolbox, kmeans, everything is fine. Why can't matlab find iforest?

 Accepted Answer

According to its documentation page the iforest function was "Introduced in R2021b". If you're using an older release of Statistics and Machine Learning Toolbox you will not be able to use this function. Upgrade to release R2021b or later.

More Answers (1)

Look for the file:
>> which iforest
C:\Program Files\MATLAB\R2021b\toolbox\stats\anomaly\iforest.m
Replace 2021b with the version you have of course. Do you have that file? What happens if you execute that "which" statement?

Categories

Community Treasure Hunt

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

Start Hunting!