Mercurial > octave-nkf
annotate src/DLD-FUNCTIONS/dasrt.cc @ 9067:8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Grammarcheck input .txi files
Spellcheck .texi files
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Sat, 28 Mar 2009 22:18:51 -0700 |
parents | 7c02ec148a3c |
children | 610bf90fce2a |
rev | line source |
---|---|
3990 | 1 /* |
2 | |
8920 | 3 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 John W. Eaton |
3990 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
3990 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
3990 | 20 |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
4052 | 27 #include <iostream> |
3990 | 28 #include <string> |
29 | |
30 #include "DASRT.h" | |
31 #include "lo-mappers.h" | |
32 | |
33 #include "defun-dld.h" | |
34 #include "error.h" | |
35 #include "gripes.h" | |
36 #include "oct-obj.h" | |
37 #include "ov-fcn.h" | |
5729 | 38 #include "ov-cell.h" |
3990 | 39 #include "pager.h" |
40 #include "parse.h" | |
41 #include "unwind-prot.h" | |
42 #include "utils.h" | |
43 #include "variables.h" | |
44 | |
3998 | 45 #include "DASRT-opts.cc" |
46 | |
4115 | 47 // Global pointers for user defined function required by dasrt. |
3990 | 48 static octave_function *dasrt_f; |
49 static octave_function *dasrt_j; | |
50 static octave_function *dasrt_cf; | |
51 | |
4140 | 52 // Have we warned about imaginary values returned from user function? |
53 static bool warned_fcn_imaginary = false; | |
54 static bool warned_jac_imaginary = false; | |
55 static bool warned_cf_imaginary = false; | |
56 | |
3990 | 57 // Is this a recursive call? |
58 static int call_depth = 0; | |
59 | |
60 static ColumnVector | |
4628 | 61 dasrt_user_f (const ColumnVector& x, const ColumnVector& xdot, |
5275 | 62 double t, octave_idx_type&) |
3990 | 63 { |
64 ColumnVector retval; | |
65 | |
4628 | 66 assert (x.capacity () == xdot.capacity ()); |
3990 | 67 |
4628 | 68 octave_value_list args; |
3990 | 69 |
3993 | 70 args(2) = t; |
4628 | 71 args(1) = xdot; |
72 args(0) = x; | |
3990 | 73 |
74 if (dasrt_f) | |
75 { | |
76 octave_value_list tmp = dasrt_f->do_multi_index_op (1, args); | |
77 | |
78 if (error_state) | |
79 { | |
80 gripe_user_supplied_eval ("dasrt"); | |
81 return retval; | |
82 } | |
83 | |
84 if (tmp.length () > 0 && tmp(0).is_defined ()) | |
85 { | |
4140 | 86 if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) |
87 { | |
88 warning ("dasrt: ignoring imaginary part returned from user-supplied function"); | |
89 warned_fcn_imaginary = true; | |
90 } | |
91 | |
3990 | 92 retval = ColumnVector (tmp(0).vector_value ()); |
93 | |
94 if (error_state || retval.length () == 0) | |
95 gripe_user_supplied_eval ("dasrt"); | |
96 } | |
97 else | |
98 gripe_user_supplied_eval ("dasrt"); | |
99 } | |
100 | |
101 return retval; | |
102 } | |
103 | |
104 static ColumnVector | |
105 dasrt_user_cf (const ColumnVector& x, double t) | |
106 { | |
107 ColumnVector retval; | |
108 | |
109 octave_value_list args; | |
110 | |
111 args(1) = t; | |
4628 | 112 args(0) = x; |
3990 | 113 |
114 if (dasrt_cf) | |
115 { | |
116 octave_value_list tmp = dasrt_cf->do_multi_index_op (1, args); | |
117 | |
118 if (error_state) | |
119 { | |
120 gripe_user_supplied_eval ("dasrt"); | |
121 return retval; | |
122 } | |
123 | |
124 if (tmp.length () > 0 && tmp(0).is_defined ()) | |
125 { | |
4140 | 126 if (! warned_cf_imaginary && tmp(0).is_complex_type ()) |
127 { | |
128 warning ("dasrt: ignoring imaginary part returned from user-supplied constraint function"); | |
129 warned_cf_imaginary = true; | |
130 } | |
131 | |
3990 | 132 retval = ColumnVector (tmp(0).vector_value ()); |
133 | |
134 if (error_state || retval.length () == 0) | |
135 gripe_user_supplied_eval ("dasrt"); | |
136 } | |
137 else | |
138 gripe_user_supplied_eval ("dasrt"); | |
139 } | |
140 | |
141 return retval; | |
142 } | |
143 | |
144 static Matrix | |
3993 | 145 dasrt_user_j (const ColumnVector& x, const ColumnVector& xdot, |
146 double t, double cj) | |
3990 | 147 { |
148 Matrix retval; | |
149 | |
4628 | 150 assert (x.capacity () == xdot.capacity ()); |
3990 | 151 |
3993 | 152 octave_value_list args; |
153 | |
154 args(3) = cj; | |
155 args(2) = t; | |
4628 | 156 args(1) = xdot; |
157 args(0) = x; | |
3990 | 158 |
3993 | 159 if (dasrt_j) |
160 { | |
161 octave_value_list tmp = dasrt_j->do_multi_index_op (1, args); | |
3990 | 162 |
163 if (error_state) | |
164 { | |
165 gripe_user_supplied_eval ("dasrt"); | |
166 return retval; | |
167 } | |
168 | |
3993 | 169 int tlen = tmp.length (); |
170 if (tlen > 0 && tmp(0).is_defined ()) | |
3990 | 171 { |
4140 | 172 if (! warned_jac_imaginary && tmp(0).is_complex_type ()) |
173 { | |
174 warning ("dasrt: ignoring imaginary part returned from user-supplied jacobian function"); | |
175 warned_jac_imaginary = true; | |
176 } | |
177 | |
3990 | 178 retval = tmp(0).matrix_value (); |
179 | |
180 if (error_state || retval.length () == 0) | |
181 gripe_user_supplied_eval ("dasrt"); | |
182 } | |
183 else | |
184 gripe_user_supplied_eval ("dasrt"); | |
185 } | |
186 | |
187 return retval; | |
188 } | |
189 | |
190 #define DASRT_ABORT \ | |
191 do \ | |
192 { \ | |
193 unwind_protect::run_frame ("Fdasrt"); \ | |
194 return retval; \ | |
195 } \ | |
196 while (0) | |
197 | |
198 #define DASRT_ABORT1(msg) \ | |
199 do \ | |
200 { \ | |
4035 | 201 ::error ("dasrt: " msg); \ |
3990 | 202 DASRT_ABORT; \ |
203 } \ | |
204 while (0) | |
205 | |
206 #define DASRT_ABORT2(fmt, arg) \ | |
207 do \ | |
208 { \ | |
4035 | 209 ::error ("dasrt: " fmt, arg); \ |
3990 | 210 DASRT_ABORT; \ |
211 } \ | |
212 while (0) | |
213 | |
3997 | 214 DEFUN_DLD (dasrt, args, nargout, |
3990 | 215 "-*- texinfo -*-\n\ |
4115 | 216 @deftypefn {Loadable Function} {[@var{x}, @var{xdot}, @var{t_out}, @var{istat}, @var{msg}] =} dasrt (@var{fcn} [, @var{g}], @var{x_0}, @var{xdot_0}, @var{t} [, @var{t_crit}])\n\ |
217 Solve the set of differential-algebraic equations\n\ | |
218 @tex\n\ | |
4852 | 219 $$ 0 = f (x, \\dot{x}, t) $$\n\ |
4115 | 220 with\n\ |
221 $$ x(t_0) = x_0, \\dot{x}(t_0) = \\dot{x}_0 $$\n\ | |
222 @end tex\n\ | |
8517
81d6ab3ac93c
Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents:
7017
diff
changeset
|
223 @ifnottex\n\ |
3990 | 224 \n\ |
225 @example\n\ | |
4852 | 226 0 = f (x, xdot, t)\n\ |
4115 | 227 @end example\n\ |
228 \n\ | |
229 with\n\ | |
230 \n\ | |
231 @example\n\ | |
232 x(t_0) = x_0, xdot(t_0) = xdot_0\n\ | |
3990 | 233 @end example\n\ |
234 \n\ | |
8517
81d6ab3ac93c
Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents:
7017
diff
changeset
|
235 @end ifnottex\n\ |
4115 | 236 with functional stopping criteria (root solving).\n\ |
237 \n\ | |
238 The solution is returned in the matrices @var{x} and @var{xdot},\n\ | |
239 with each row in the result matrices corresponding to one of the\n\ | |
240 elements in the vector @var{t_out}. The first element of @var{t}\n\ | |
241 should be @math{t_0} and correspond to the initial state of the\n\ | |
242 system @var{x_0} and its derivative @var{xdot_0}, so that the first\n\ | |
243 row of the output @var{x} is @var{x_0} and the first row\n\ | |
244 of the output @var{xdot} is @var{xdot_0}.\n\ | |
245 \n\ | |
246 The vector @var{t} provides an upper limit on the length of the\n\ | |
247 integration. If the stopping condition is met, the vector\n\ | |
248 @var{t_out} will be shorter than @var{t}, and the final element of\n\ | |
249 @var{t_out} will be the point at which the stopping condition was met,\n\ | |
250 and may not correspond to any element of the vector @var{t}.\n\ | |
251 \n\ | |
8787 | 252 The first argument, @var{fcn}, is a string, inline, or function handle\n\ |
253 that names the function @math{f} to call to compute the vector of\n\ | |
254 residuals for the set of equations. It must have the form\n\ | |
3990 | 255 \n\ |
256 @example\n\ | |
4115 | 257 @var{res} = f (@var{x}, @var{xdot}, @var{t})\n\ |
3990 | 258 @end example\n\ |
259 \n\ | |
260 @noindent\n\ | |
4115 | 261 in which @var{x}, @var{xdot}, and @var{res} are vectors, and @var{t} is a\n\ |
262 scalar.\n\ | |
263 \n\ | |
8787 | 264 If @var{fcn} is a two-element string array or a two-element cell array\n\ |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
9064
diff
changeset
|
265 of strings, inline functions, or function handles, the first element names\n\ |
8787 | 266 the function @math{f} described above, and the second element names a\n\ |
267 function to compute the modified Jacobian\n\ | |
3990 | 268 \n\ |
4115 | 269 @tex\n\ |
270 $$\n\ | |
271 J = {\\partial f \\over \\partial x}\n\ | |
272 + c {\\partial f \\over \\partial \\dot{x}}\n\ | |
273 $$\n\ | |
274 @end tex\n\ | |
8517
81d6ab3ac93c
Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents:
7017
diff
changeset
|
275 @ifnottex\n\ |
3990 | 276 \n\ |
4115 | 277 @example\n\ |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
278 @group\n\ |
4115 | 279 df df\n\ |
280 jac = -- + c ------\n\ | |
281 dx d xdot\n\ | |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
282 @end group\n\ |
4115 | 283 @end example\n\ |
284 \n\ | |
8517
81d6ab3ac93c
Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents:
7017
diff
changeset
|
285 @end ifnottex\n\ |
4115 | 286 \n\ |
287 The modified Jacobian function must have the form\n\ | |
288 \n\ | |
289 @example\n\ | |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
290 @group\n\ |
3990 | 291 \n\ |
4115 | 292 @var{jac} = j (@var{x}, @var{xdot}, @var{t}, @var{c})\n\ |
293 \n\ | |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
294 @end group\n\ |
4115 | 295 @end example\n\ |
3990 | 296 \n\ |
4115 | 297 The optional second argument names a function that defines the\n\ |
298 constraint functions whose roots are desired during the integration.\n\ | |
299 This function must have the form\n\ | |
3990 | 300 \n\ |
4115 | 301 @example\n\ |
302 @var{g_out} = g (@var{x}, @var{t})\n\ | |
303 @end example\n\ | |
3990 | 304 \n\ |
4115 | 305 and return a vector of the constraint function values.\n\ |
306 If the value of any of the constraint functions changes sign, @sc{Dasrt}\n\ | |
307 will attempt to stop the integration at the point of the sign change.\n\ | |
308 \n\ | |
309 If the name of the constraint function is omitted, @code{dasrt} solves\n\ | |
4852 | 310 the same problem as @code{daspk} or @code{dassl}.\n\ |
3990 | 311 \n\ |
4115 | 312 Note that because of numerical errors in the constraint functions\n\ |
313 due to roundoff and integration error, @sc{Dasrt} may return false\n\ | |
314 roots, or return the same root at two or more nearly equal values of\n\ | |
315 @var{T}. If such false roots are suspected, the user should consider\n\ | |
316 smaller error tolerances or higher precision in the evaluation of the\n\ | |
317 constraint functions.\n\ | |
3990 | 318 \n\ |
4115 | 319 If a root of some constraint function defines the end of the problem,\n\ |
320 the input to @sc{Dasrt} should nevertheless allow integration to a\n\ | |
321 point slightly past that root, so that @sc{Dasrt} can locate the root\n\ | |
322 by interpolation.\n\ | |
3990 | 323 \n\ |
4115 | 324 The third and fourth arguments to @code{dasrt} specify the initial\n\ |
325 condition of the states and their derivatives, and the fourth argument\n\ | |
326 specifies a vector of output times at which the solution is desired,\n\ | |
327 including the time corresponding to the initial condition.\n\ | |
328 \n\ | |
329 The set of initial states and derivatives are not strictly required to\n\ | |
330 be consistent. In practice, however, @sc{Dassl} is not very good at\n\ | |
331 determining a consistent set for you, so it is best if you ensure that\n\ | |
332 the initial values result in the function evaluating to zero.\n\ | |
3990 | 333 \n\ |
4115 | 334 The sixth argument is optional, and may be used to specify a set of\n\ |
335 times that the DAE solver should not integrate past. It is useful for\n\ | |
336 avoiding difficulties with singularities and points where there is a\n\ | |
337 discontinuity in the derivative.\n\ | |
3990 | 338 \n\ |
4115 | 339 After a successful computation, the value of @var{istate} will be\n\ |
340 greater than zero (consistent with the Fortran version of @sc{Dassl}).\n\ | |
341 \n\ | |
342 If the computation is not successful, the value of @var{istate} will be\n\ | |
343 less than zero and @var{msg} will contain additional information.\n\ | |
3990 | 344 \n\ |
345 You can use the function @code{dasrt_options} to set optional\n\ | |
346 parameters for @code{dasrt}.\n\ | |
5694 | 347 @seealso{daspk, dasrt, lsode}\n\ |
5642 | 348 @end deftypefn") |
3990 | 349 { |
350 octave_value_list retval; | |
351 | |
4140 | 352 warned_fcn_imaginary = false; |
353 warned_jac_imaginary = false; | |
354 warned_cf_imaginary = false; | |
355 | |
3990 | 356 unwind_protect::begin_frame ("Fdasrt"); |
357 | |
358 unwind_protect_int (call_depth); | |
359 call_depth++; | |
360 | |
361 if (call_depth > 1) | |
362 DASRT_ABORT1 ("invalid recursive call"); | |
363 | |
364 int argp = 0; | |
365 | |
366 int nargin = args.length (); | |
367 | |
368 if (nargin < 4 || nargin > 6) | |
369 { | |
5823 | 370 print_usage (); |
3990 | 371 unwind_protect::run_frame ("Fdasrt"); |
372 return retval; | |
373 } | |
374 | |
5729 | 375 std::string fcn_name, fname, jac_name, jname; |
3990 | 376 dasrt_f = 0; |
377 dasrt_j = 0; | |
378 dasrt_cf = 0; | |
379 | |
380 // Check all the arguments. Are they the right animals? | |
381 | |
382 // Here's where I take care of f and j in one shot: | |
383 | |
384 octave_value f_arg = args(0); | |
385 | |
5729 | 386 if (f_arg.is_cell ()) |
3990 | 387 { |
5729 | 388 Cell c = f_arg.cell_value (); |
389 if (c.length() == 1) | |
390 f_arg = c(0); | |
391 else if (c.length() == 2) | |
392 { | |
393 if (c(0).is_function_handle () || c(0).is_inline_function ()) | |
394 dasrt_f = c(0).function_value (); | |
395 else | |
396 { | |
397 fcn_name = unique_symbol_name ("__dasrt_fcn__"); | |
398 fname = "function y = "; | |
399 fname.append (fcn_name); | |
400 fname.append (" (x, xdot, t) y = "); | |
401 dasrt_f = extract_function | |
402 (c(0), "dasrt", fcn_name, fname, "; endfunction"); | |
403 } | |
404 | |
405 if (dasrt_f) | |
406 { | |
407 if (c(1).is_function_handle () || c(1).is_inline_function ()) | |
408 dasrt_j = c(1).function_value (); | |
409 else | |
410 { | |
411 jac_name = unique_symbol_name ("__dasrt_jac__"); | |
412 jname = "function jac = "; | |
413 jname.append(jac_name); | |
414 jname.append (" (x, xdot, t, cj) jac = "); | |
415 dasrt_j = extract_function | |
416 (c(1), "dasrt", jac_name, jname, "; endfunction"); | |
417 | |
418 if (!dasrt_j) | |
419 { | |
420 if (fcn_name.length()) | |
421 clear_function (fcn_name); | |
422 dasrt_f = 0; | |
423 } | |
424 } | |
425 } | |
426 } | |
427 else | |
428 DASRT_ABORT1 ("incorrect number of elements in cell array"); | |
429 } | |
430 | |
431 if (!dasrt_f && ! f_arg.is_cell()) | |
432 { | |
433 if (f_arg.is_function_handle () || f_arg.is_inline_function ()) | |
434 dasrt_f = f_arg.function_value (); | |
435 else | |
436 { | |
437 switch (f_arg.rows ()) | |
438 { | |
439 case 1: | |
440 fcn_name = unique_symbol_name ("__dasrt_fcn__"); | |
441 fname = "function y = "; | |
442 fname.append (fcn_name); | |
443 fname.append (" (x, xdot, t) y = "); | |
444 dasrt_f = extract_function | |
445 (f_arg, "dasrt", fcn_name, fname, "; endfunction"); | |
446 break; | |
3990 | 447 |
5729 | 448 case 2: |
449 { | |
450 string_vector tmp = args(0).all_strings (); | |
3990 | 451 |
5729 | 452 if (! error_state) |
453 { | |
454 fcn_name = unique_symbol_name ("__dasrt_fcn__"); | |
455 fname = "function y = "; | |
456 fname.append (fcn_name); | |
457 fname.append (" (x, xdot, t) y = "); | |
458 dasrt_f = extract_function | |
459 (tmp(0), "dasrt", fcn_name, fname, "; endfunction"); | |
3990 | 460 |
5729 | 461 if (dasrt_f) |
462 { | |
463 jac_name = unique_symbol_name ("__dasrt_jac__"); | |
464 jname = "function jac = "; | |
465 jname.append(jac_name); | |
466 jname.append (" (x, xdot, t, cj) jac = "); | |
467 dasrt_j = extract_function | |
468 (tmp(1), "dasrt", jac_name, jname, "; endfunction"); | |
469 | |
470 if (! dasrt_j) | |
471 dasrt_f = 0; | |
472 } | |
473 } | |
3990 | 474 } |
5729 | 475 break; |
3990 | 476 |
5729 | 477 default: |
478 DASRT_ABORT1 | |
479 ("first arg should be a string or 2-element string array"); | |
480 } | |
481 } | |
3990 | 482 } |
483 | |
484 if (error_state || (! dasrt_f)) | |
485 DASRT_ABORT; | |
486 | |
487 DAERTFunc func (dasrt_user_f); | |
488 | |
489 argp++; | |
490 | |
5729 | 491 if (args(1).is_function_handle() || args(1).is_inline_function()) |
492 { | |
493 dasrt_cf = args(1).function_value(); | |
494 | |
495 if (! dasrt_cf) | |
496 DASRT_ABORT1 ("expecting function name as argument 2"); | |
497 | |
498 argp++; | |
499 | |
500 func.set_constraint_function (dasrt_user_cf); | |
501 } | |
502 else if (args(1).is_string ()) | |
3990 | 503 { |
504 dasrt_cf = is_valid_function (args(1), "dasrt", true); | |
505 if (! dasrt_cf) | |
3992 | 506 DASRT_ABORT1 ("expecting function name as argument 2"); |
3990 | 507 |
508 argp++; | |
509 | |
510 func.set_constraint_function (dasrt_user_cf); | |
511 } | |
512 | |
513 ColumnVector state (args(argp++).vector_value ()); | |
514 | |
515 if (error_state) | |
516 DASRT_ABORT2 ("expecting state vector as argument %d", argp); | |
517 | |
3992 | 518 ColumnVector stateprime (args(argp++).vector_value ()); |
3990 | 519 |
520 if (error_state) | |
521 DASRT_ABORT2 | |
522 ("expecting time derivative of state vector as argument %d", argp); | |
523 | |
3994 | 524 ColumnVector out_times (args(argp++).vector_value ()); |
3990 | 525 |
526 if (error_state) | |
527 DASRT_ABORT2 | |
528 ("expecting output time vector as %s argument %d", argp); | |
529 | |
3994 | 530 double tzero = out_times (0); |
3990 | 531 |
532 ColumnVector crit_times; | |
533 | |
534 bool crit_times_set = false; | |
535 | |
536 if (argp < nargin) | |
537 { | |
538 crit_times = ColumnVector (args(argp++).vector_value ()); | |
539 | |
540 if (error_state) | |
541 DASRT_ABORT2 | |
542 ("expecting critical time vector as argument %d", argp); | |
543 | |
544 crit_times_set = true; | |
545 } | |
546 | |
547 if (dasrt_j) | |
548 func.set_jacobian_function (dasrt_user_j); | |
549 | |
550 DASRT_result output; | |
551 | |
3992 | 552 DASRT dae = DASRT (state, stateprime, tzero, func); |
3990 | 553 |
4122 | 554 dae.set_options (dasrt_opts); |
3990 | 555 |
556 if (crit_times_set) | |
557 output = dae.integrate (out_times, crit_times); | |
558 else | |
559 output = dae.integrate (out_times); | |
560 | |
5729 | 561 if (fcn_name.length()) |
562 clear_function (fcn_name); | |
563 if (jac_name.length()) | |
564 clear_function (jac_name); | |
565 | |
3990 | 566 if (! error_state) |
567 { | |
3997 | 568 std::string msg = dae.error_message (); |
569 | |
570 retval(4) = msg; | |
571 retval(3) = static_cast<double> (dae.integration_state ()); | |
572 | |
573 if (dae.integration_ok ()) | |
574 { | |
575 retval(2) = output.times (); | |
576 retval(1) = output.deriv (); | |
577 retval(0) = output.state (); | |
578 } | |
579 else | |
580 { | |
581 retval(2) = Matrix (); | |
582 retval(1) = Matrix (); | |
583 retval(0) = Matrix (); | |
584 | |
585 if (nargout < 4) | |
586 error ("dasrt: %s", msg.c_str ()); | |
587 } | |
3990 | 588 } |
589 | |
590 unwind_protect::run_frame ("Fdasrt"); | |
591 | |
592 return retval; | |
593 } | |
594 | |
595 /* | |
596 ;;; Local Variables: *** | |
597 ;;; mode: C++ *** | |
598 ;;; End: *** | |
599 */ |