# Obtaining mathematical equation from neural network toolbox after training

23 views (last 30 days)

Show older comments

My ANN is for 3 inputs, N neurons in a single hidden layer and output. Tansig transfer function was used in the hidden layer and purelin in the output layer. Using the weight and bias values, I obtained my model equation

y = LW*(tansig(IW*X + b1 )) + b2

and transformed it into

y = A*((2/(1 + exp(-2*(B*X + b1)))) - 1) + b2

where A = LW values in (1xN) array

B = IW values in (Nx3) array

X = 3 input values in (3x1) array

b1 = layer 1 bias values in (Nx1) array and b2, bias value for layer 2 is a single value (1x1)

My model equation only works in matlab environment because my constants A, B and b1 are in array form.

I need to have A and b1 values as single constant values, and B as a (1x3) array to have B1, B2 and B3 for the 3 inputs. but I don't know how to achieve this..

PLEASE is there anyone that can tell how to make my equation a standalone that works anywhere, like excel & others..??

##### 3 Comments

Greg Heath
on 8 Jul 2016

I'm not sure that I understand your argument.

If you are saying that the weights do not depend on the type of normalization, you are incorrect.

### Accepted Answer

circuit_designer5172
on 7 Jul 2016

### More Answers (3)

Bhupendra Suryawansi
on 29 Dec 2017

##### 1 Comment

Greg Heath
on 30 Dec 2017

Why are you bothering to normalize? MATLAB handles normalization automatically.

Just look at the examples used in the help and doc documentation.

Hope this helps.

Greg

Bhupendra Suryawansi
on 2 Jan 2018

##### 0 Comments

pathakunta
on 26 Jan 2024

##### 0 Comments

### See Also

### Categories

### Products

### Community Treasure Hunt

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

Start Hunting!