Question about private functions

2 views (last 30 days)
xiaoyu
xiaoyu on 29 Aug 2013
I have 2 functions with the same name, one is private, and the other is normal. I want to use the private one instead of the public one. How to realize this?
I actually came in this question when I use cftool. In fit function, it calls fro a checkbounds function. Under the folder of curvefit, it has a private function called checkbounds, while in another toolbox, there is another checkbounds function which is not private.
Many thanks!!

Accepted Answer

Matt J
Matt J on 29 Aug 2013
Edited: Matt J on 29 Aug 2013
There is no reason the two versions should be in conflict. When running cftool, it should be calling its private version (private functions always get precendence), which is what you want.

More Answers (1)

the cyclist
the cyclist on 29 Aug 2013
In your fit function, can you specify the full path name to the function you want to call?
  1 Comment
xiaoyu
xiaoyu on 29 Aug 2013
Sorry I don't know about it. Could explain a little more?

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!