I'm supposed to write a program that takes an equation and will accept a scalar, a vector, or matrix.
I know to use ^ when dealing with scalars, and .^ when dealing with vectors/ matrices, but is there a way that will accept both?
I hope this question is clear.
Thanks,
Emmanuel

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 9 de Feb. de 2014

0 votos

You can use .^

Más respuestas (0)

Preguntada:

el 9 de Feb. de 2014

Comentada:

el 9 de Feb. de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by