square of a vector
Mostrar comentarios más antiguos
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??
Respuesta aceptada
Más respuestas (1)
Matt J
el 31 de Oct. de 2012
A=norm(B-C)^2;
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!