Borrar filtros
Borrar filtros

Why does my matlab function produce result more than I expect?

1 visualización (últimos 30 días)
Please see the attached pdf file for the issue. Thanks!

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 10 de En. de 2016
use:
Testing;

Más respuestas (1)

Stephen23
Stephen23 el 10 de En. de 2016
Editada: Stephen23 el 11 de En. de 2016
Your function Testing has two outputs, and when you call the function the first output is displayed by default, unless you suffix the line with a semicolon. So instead of calling this:
Testing
you need to call this:
Testing;
Note that a function output is a totally different thing to the text that you are fprintf-ing in the command window: do not get confused between these.
  3 comentarios
Stephen23
Stephen23 el 10 de En. de 2016
My pleasure. You can also vote for my answer if it helped you.

Iniciar sesión para comentar.

Categorías

Más información sobre Testing Frameworks en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by