MATLAB: Passing argument between functions

matlab function

i have 2 functions both don't have input arguments they take inputs using input functions
function [t,v] = polystep()
x = input(prompt1);
y = input(prompt2);
z = input(prompt3);
and
function ppp = polysys()
x1 = input(prompt1);
y1= input(prompt2);
z1 = input(prompt3);
i want to call polytep in polysys and give x,y,z the values of x1,y1,z1. is there any way to do this ?

Best Answer

Assign x, y, z output of polystep, that can make your requirement possible
function [t,v, x, y, z] = polystep()
x = input('prompt1');
y = input('prompt2');
z = input('prompt3');
Then
function ppp = polysys()
[~,~, x1, y1, z1] = polystep();