How to use a custom transfer function in neural net training

B
bob_marley · Jul 6, 2021 · 2K views
Question
I want to use a function similar to tansig. I don't seem to be able to find a good example, and the tansig.apply method only allows me one line! I'm wrapped around this axle, and I suspect I'm missing something simple. Any ideas? I'm using 2012b.  
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 29, 2026
I cannot make sense of your post.
 
 
tanh(x) = tansig(x)

elliotsig(4*x) ~ tansig(x)

elliotsig4(x) ~ tansig(x)

function y = elliotsig4(x)

      y = x./(0.25 + abs(x));

end
What do you mean by the tansig.apply method ???
 
Sample code would help explain.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!