function myFunc = executeCmdByKind(var1,kind)
switch kind
case 'open'
cmdToExecute = [''var1 '','' locationIs '',''clear''];
case 'close'
cmdToExecute = [''var1 '','' locationIs '',''delete''];
case 'move'
cmdToExecute = [''var1 '','' locationIs '',''move''];
end
a = system(cmdToExecute);
end
My question is : is there a better way "optimal" to write this code as I call the same cmdToExecute only the latest arg changes
Thanks,
latest arg changes?''? Is this supposed to be a cell array of strings? That is very strange Matlab syntax to me. Also you never assign tomyFuncso your function will have no output...