comparison scripts/testfun/demo.m @ 7540:3422f39573b1

strcat.m: Matlab compatibility, with cstrcat.m replacing conventional strcat.m.
author Ben Abbott <bpabbott@mac.com>
date Thu, 28 Feb 2008 02:41:19 -0500
parents a1dbe9d80eee
children cf59d542f33e
comparison
equal deleted inserted replaced
7539:3e107d73aeb4 7540:3422f39573b1
109 109
110 ## Process each demo without failing 110 ## Process each demo without failing
111 try 111 try
112 block = code(idx(doidx(i)):idx(doidx(i)+1)-1); 112 block = code(idx(doidx(i)):idx(doidx(i)+1)-1);
113 ## Use an environment without variables 113 ## Use an environment without variables
114 eval (strcat ("function __demo__()\n", block, "\nendfunction")); 114 eval (cstrcat ("function __demo__()\n", block, "\nendfunction"));
115 ## Display the code that will be executed before executing it 115 ## Display the code that will be executed before executing it
116 printf ("%s example %d:%s\n\n", name, doidx(i), block); 116 printf ("%s example %d:%s\n\n", name, doidx(i), block);
117 __demo__; 117 __demo__;
118 catch 118 catch
119 ## Let the programmer know which demo failed. 119 ## Let the programmer know which demo failed.