how to execute the algorithmic operations like summation, cross etc. in matlab?
Afficher commentaires plus anciens
like in the equation
Activation(j) = |Input^Weight(j)| / (bias + |Weight(j)|
R=(<v,x>)/(‖x‖)
Y=∑ I x W
actually i am implementing ART1 algorithm on protein sequence, in which for category activation this formula is being used. in this formula i.e activation for category=1 the 'Input' i.e fold1 is of size [104,1] and weight [104,1]'. but the calculation seems to be taking enormous time, when i tried to multiply whereas using 'min' its computationally feasible, but m afraid its not the correct implementation of the formula? plz help..
Réponse acceptée
Plus de réponses (1)
Wayne King
le 15 Fév 2014
You can use dot() to compute the inner product of two vectors.
norm( ) to compute the norm, since the norm induced by the inner product is the 2-norm, you likely want
norm(x,2)
For example,
x = randn(100,1);
y = randn(100,1);
R = dot(x,y)/norm(x,2);
Catégories
En savoir plus sur Particle & Nuclear Physics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!