Borrar filtros
Borrar filtros

How can I use a fonction result in a new script.

2 visualizaciones (últimos 30 días)
Viviana
Viviana el 17 de Oct. de 2013
Respondida: Nishitha Ayyalapu el 17 de Oct. de 2013
After run a function I get ans = ... on the command window. I wish to declare the result of mi function as a variable to use it in a new scrip. It's that possible?
Thanks

Respuestas (1)

Nishitha Ayyalapu
Nishitha Ayyalapu el 17 de Oct. de 2013
doc function
Example
function result = Addition(X,Y)
result = X+Y;
end
Now in any other script you can just do
Z = Addition(2,3);

Categorías

Más información sobre Help and Support en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by