Stop the code if the cells are empty

12 views (last 30 days)
im trying to find a way if my variable 'answer' (which is a cell) is blank/empty, how to stop the script.
I initially tried:
answer variable is:
error:

Accepted Answer

Ronald Godagandeni Dewage
Ronald Godagandeni Dewage on 11 Feb 2021
Edited: Voss on 14 Dec 2023
i think the found the answer its;
if isempty(answer)
return
end
let me know if anyone got better abetter idea

More Answers (0)

Community Treasure Hunt

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

Start Hunting!