This might be a pretty basic question but I was not able to find an answer for this.
I am trying to run a matlab code that has two arguments passed to it :
1. Name of an existing matlab code
2. An integer number.
This would be the command I would run in the command window in Matlab-
>> auto_caller mytest.m 10
Here auto_caller is the main code and it should execute the file mytest.m 10 times.
This is what I tried -
function [arguments] = auto_caller(filename, iterations)
for i = 0 : str2num(iterations)
filename
end
end
But when I run it, the output is just -
mytest.m
mytest.m
mytest.m
mytest.m
mytest.m
mytest.m
mytest.m
mytest.m
mytest.m
mytest.m
Can someone help me to solve this problem?
Thanks,
Shreedhar