[14012] in Athena Bugs
Matlab reduce.m
daemon@ATHENA.MIT.EDU (Erik Nygren)
Wed Nov 22 02:31:39 1995
To: bugs@MIT.EDU
Date: Wed, 22 Nov 1995 02:31:26 -0500
From: Erik Nygren <nygren@MIT.EDU>
PROGRAM: Matlab 4.2
PLATFORM: Linux (although the problem appears in a script)
PROBLEM:
In the file:
/mit/matlab/Matlab4.2/toolbox/contrib/control/reduce.m
the command fails because of what seems like a typo. It seems like
the .. on line 76 is a syntax error and should be replaced by bringing
the two lines together. The error message is:
---------------- START ERROR TRANSCRIPT --------------
>> [aaa,bbb] = reduce([1 2 3],[1 2 0],2)
??? ax(abs(den_root), .
|
Missing variable or function.
Error in ==> /mit/matlab/Matlab4.2/toolbox/contrib/control/reduce.m
On line 76 ==> error = error/max(abs(den_root), ..
---------------- END ERROR TRANSCRIPT --------------
I've appended a patch which may solve the problem:
--- /mit/matlab/Matlab4.2/toolbox/contrib/control/reduce.m Wed Aug 10 08:55:52 1994
+++ reduce.m Wed Nov 22 02:25:55 1995
@@ -73,8 +73,7 @@
else
% Calculate the relative error of the two roots
error = abs(den_root-num_root);
- error = error/max(abs(den_root), ..
- abs(num_root));
+ error = error/max(abs(den_root), abs(num_root));
% If the calculated error is less than that
% allowed by the user, the roots are the same,