Removing content from folder in matlab

directory, matlab

Solution

`system('rm -rf results/*')` should be exactly the same as your C code.

Problem

In the matlab code I am generating files at after specific iterations in a file called 'results' in present working directory. When I want to run the code next time, files crated by previous run are also present in the results folder. In C I would do that as ``` (void) system("rm -rf results/*"); ``` How can I remove content of folder 'results' every time code starts to execute? Thanks.

Original source