Summation of an array
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Barry Allen
le 5 Fév 2020
Commenté : Barry Allen
le 6 Fév 2020
How can i code this in matlab?
0 commentaires
Réponse acceptée
JESUS DAVID ARIZA ROYETH
le 5 Fév 2020
if length(P) and length(Y) is N:
x=sum(P.*Y)
in another case:
N=5; %set any value for N
x=sum(P(1:N).*Y(1:N))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Number Theory dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!