Pass variables to the workspace from a function

Hi Folks,
I want to see the variables and their characteristics in the work space from a function. How can I achieve this? here is a simple code
function addtwo(x,y)
% addtwo(x,y) Adds two numbers, vectors, whatever, and
% print the result = x + y
x+y
Thanks

 Respuesta aceptada

Sean de Wolski
Sean de Wolski el 15 de En. de 2015
Editada: Sean de Wolski el 15 de En. de 2015
function z = addtwo(x,y)
z = x+y;
Then call it:
zz = addtwo(1,3)
If you want to stop inside of addtwo, put a breakpoint there and execution will stop (click on the dash to the left hand side of the line number).

Más respuestas (0)

Categorías

Más información sobre Scope Variables and Generate Names en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de En. de 2015

Editada:

el 15 de En. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by