how to execute the algorithmic operations like summation, cross etc. in matlab?
Show older comments
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..
Accepted Answer
More Answers (1)
Wayne King
on 15 Feb 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);
1 Comment
g.s.p
on 15 Feb 2014
Categories
Find more on Operators and Elementary Operations 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!