How do I run a function from an older version of MATLAB?
Show older comments
Hello, I need to run this function which was written on an older version of MATLAB. My current version is 2011 and I think the function was written on 2006. Any feedback will be appreciated.
5 Comments
Image Analyst
on 4 Dec 2016
You forgot to tell us the function. Which function no longer runs? If it's the whole mytansig, then at least tell us what line in it does not run anymore.
Emil Petrov
on 4 Dec 2016
Walter Roberson
on 4 Dec 2016
How are you running the code?
The code uses an internal routine of the neural network toolbox that was replaced in R2010b, but it should have continued to work with your R2011 release. And the problem you are encountering does not appear to be related to that.
Emil Petrov
on 13 Aug 2017
Walter Roberson
on 13 Aug 2017
Emil,
In current versions you would need to replace the use of newff(); see https://www.mathworks.com/matlabcentral/answers/77741-newff-create-a-feed-forward-backpropagation-network-obsoleted-in-r2010b-nnet-7-0 which suggests newpr() for pattern recognition.
You can find information about creating custom transfer functions at https://www.mathworks.com/matlabcentral/answers/56137-how-to-use-a-custom-transfer-function-in-neural-net-training#answer_80148
The mytansig code makes reference to 'dtansig' when called with the 'deriv' parameter, but dtansig no longer exists: since R2006a you have needed to instead call tansig with 'dn' as the first parameter.
This is probably something that you would find implicitly addressed if you were to follow the templates mentioned in the custom function information. It is not clear to me that the derivative of mytansig should be dtansig .
Answers (0)
Categories
Find more on Standard File Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!