square of a vector
古いコメントを表示
I have to calculate a square of vector which should results a scalar value. i.e) A=(B-C)^2 B and C are vectors and I need A as a scalar. How can I implement this in matlab??
採用された回答
その他の回答 (1 件)
Matt J
2012 年 10 月 31 日
A=norm(B-C)^2;
カテゴリ
ヘルプ センター および File Exchange で MATLAB Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!