square of a vector
Afficher commentaires plus anciens
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??
Réponse acceptée
Plus de réponses (1)
Matt J
le 31 Oct 2012
A=norm(B-C)^2;
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!