matrix element in summation sign
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have 2 matrix A=[a;b;c] and B=[d;e;f]
Now I want the answer of
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/158291/image.jpeg)
So I type the code
syms i
symsum(A(i)*B(i),1,3)
Then there is an error "Indexing input must be numeric, logical or ':'."
But what I mean is A(1)*B(1) + A(2)*B(2) ...
So what is the correct code for this question?
0 Commenti
Risposte (1)
Mischa Kim
il 10 Mar 2014
Modificato: Mischa Kim
il 10 Mar 2014
Lo, use
syms a b c d e f
A = [a; b; c];
B = [d; e; f];
sum(A.*B)
0 Commenti
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!