Borrar filtros
Borrar filtros

How do i use output of one function as input to the other ?

1 visualización (últimos 30 días)
shubham shubham
shubham shubham el 24 de Nov. de 2020
Respondida: James Tursa el 24 de Nov. de 2020
suppose i have
function p= pos(x,y)
x=x+y;
p=x;
end
and another function
funtion z=neg(p,q) ----> How do I do this where I am passing p which is output of pos as input argument for neg?
c=p-q;
end

Respuestas (1)

James Tursa
James Tursa el 24 de Nov. de 2020
You can do this at the point where you are calling the function neg. E.g.,
z = neg(pos(x,y),q);

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by