matrix element in summation sign
2 ビュー (過去 30 日間)
古いコメントを表示
I have 2 matrix A=[a;b;c] and B=[d;e;f]
Now I want the answer of

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 件のコメント
回答 (1 件)
Mischa Kim
2014 年 3 月 10 日
編集済み: Mischa Kim
2014 年 3 月 10 日
Lo, use
syms a b c d e f
A = [a; b; c];
B = [d; e; f];
sum(A.*B)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!