how to make a response for more than one period?
Show older comments
function response = f(n,p)
if (p == 1)
response = 'yes';
elseif (p == 2)
response = 'no';
end
This is my function.
n is the number of iterations.
I want to make a response with memory. For example
if (p==1), response will be 'yes' for 2 iterations, then it will be 'no' regardless what p would be
2 Comments
Ameer Hamza
on 9 Mar 2020
Where are the iterations? There is no for or while loop in this code.
Ani Asoyan
on 9 Mar 2020
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!