run(script_file)
run(script_file, 'nocatch')
bsuccess = run(script_file, 'errcatch')
| Parameter | Description |
|---|---|
| script_file | a string: path of a script |
| 'nocatch' | a string: default option (no error catch) |
| 'errcatch' | a string: error catched |
| Parameter | Description |
|---|---|
| bsuccess | a logical: true if no error detected during script execution |
run(script_file) executes a Nelson's script file (.m file extension).
fd = fopen([tempdir(), 'example_run_ok.m'], 'wt');
fprintf(fd, ['A = 1;', char(10)]);
fprintf(fd, ['B = 2;', char(10)]);
fprintf(fd, ['C = A + B', char(10)]);
fclose(fd);
fd = fopen([tempdir(), 'example_run_not_ok.m'], 'wt');
fprintf(fd, ['AA = 1;', char(10)]);
fprintf(fd, ['CC = AA + BB', char(10)]);
fclose(fd);
run([tempdir(), 'example_run_ok.m']);
bsuccess = run([tempdir(), 'example_run_ok.m'], 'errcatch')
bsuccess = run([tempdir(), 'example_run_not_ok.m'], 'errcatch')
run([tempdir(), 'example_run_not_ok.m'], 'nocatch');
| Version | Description |
|---|---|
| 1.0.0 | initial version |