I'm a little confused about your question. I would expect that you want to build a string that looks exactly like the one you would use at the DOS command line. Assuming that your challenge is just building this string, there are a couple of approaches.
You could keep concatenating the different options, e.g.
[status, result] = system(['cpgi130.exe ' fname 'OPTION1=' num2str(500) ' GC=' num2str(55)]);
Though I would recommend that you try using sprintf to construct the command to pass to system instead of using []:
str = sprintf('cpgi130.exe %s OPTION1=%d OPTION2=%d ' ...
'OPTION3=%d','myfile.txt',10,20,40);
[status, result] = system(str);
The %s and %d mark places where you want to insert values into the string. Each one adds another input argument to the end of the call to sprintf in order, so the %s maps to the filename and the three %d's map to the option numbers. s=string, d=number.
Is this what you are looking for?
- scott