Implementing summation in Matlab using Matlab Function
8 ビュー (過去 30 日間)
古いコメントを表示
I intend to implement the summation function
. θ and
are outputs from other simulink blocks whereas
assume different values for each (i,j) combination starting from (0,0) to (4,4). I believe this can be done with use of Matalb Function block but I'm not really able to find a similar example. Can some please suggest how can this done?
0 件のコメント
回答 (1 件)
David Hill
2021 年 3 月 25 日
I assume alpha is a 4x4 matrix, theta is a 1x4 array and lambda is a 1x4 array.
[theta,lambda]=meshgrid(theta,lambda);
output=sum(alpha.*theta.*lambda,'all');
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!