|
From: | Thomas Scofield |
Subject: | unintended consequences of running Matlab script |
Date: | Thu, 28 Jun 2012 09:29:40 -0400 |
I am working at getting someone else's Matlab programs to run in Octave v. 3.4.3, which I obtained from MacPorts. Now and then this appears to involve substantive issues, such as removing the 'qz' option from a call to eig(). But the warnings are the most annoying problems. What I really don't understand is all the warnings that start appearing after I've run a script, particularly when the results of running it seem to be the ones it was meant to produce. For instance, before I run it, commands like help length svds(rand(5,8)) behave normally. However, after I run the script, here is the output from the same three commands: octave:9> help length warning: concatenation of different character string types may have unintended consequences `length' is a built-in function warning: potential Matlab compatibility problem: # used as comment character near line 1 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: # used as comment character near line 19 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: " used as string delimiter near line 27 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 30 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 31 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 32 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 33 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 34 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 35 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: \ used as line continuation marker near line 36 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m warning: potential Matlab compatibility problem: " used as string delimiter near line 36 offile /opt/local/share/octave/3.4.3/m/help/private/__additional_help_message__.m -- Built-in Function: length (A) Return the "length" of the object A. For matrix objects, the length is the number of rows or columns, whichever is greater (this odd definition is used for compatibility with MATLAB). Additional help for built-in functions and operators is available in the on-line version of the manual. Use the command `doc <topic>' to search the manual index. Help and information about Octave is also available on the WWW at http://www.octave.org and via the address@hidden mailing list. octave:11> svds(rand(5,8)) warning: implicit conversion from string to real N-d array ans = 3.17475 1.00530 0.92679 0.64290 0.54823 I've noted several odd things as well about the warning() command after running the script. Here it is run twice consecutively, once with single quotes and once with double: octave:12> warning("off",'Octave:str-to-num') warning: potential Matlab compatibility problem: " used as string delimiter warning: single quote delimited string near line 12 octave:13> warning('off','Octave:str-to-num') warning: single quote delimited string near line 13 warning: single quote delimited string near line 13 Apparently, there is no pleasing this command anymore. But also strange is that, if I follow up the above with a query octave:14> warning('query','Octave:str-to-num') warning: single quote delimited string near line 14 warning: single quote delimited string near line 14 ans = scalar structure containing the fields: identifier = Octave:str-to-num state = off and then run the script again, another query (exactly the same as above) shows "state = on" again. Quitting Octave (after the script) even produces a series of messages: octave:16> quit warning: potential Matlab compatibility problem: # used as comment character near line 1 offile /opt/local/share/octave/3.4.3/m/startup/__finish__.m warning: potential Matlab compatibility problem: # used as comment character near line 19 offile /opt/local/share/octave/3.4.3/m/startup/__finish__.m warning: potential Matlab compatibility problem: # used as comment character near line 24 offile /opt/local/share/octave/3.4.3/m/startup/__finish__.m warning: potential Matlab compatibility problem: " used as string delimiter near line 32 offile /opt/local/share/octave/3.4.3/m/startup/__finish__.m warning: potential Matlab compatibility problem: " used as string delimiter near line 32 offile /opt/local/share/octave/3.4.3/m/startup/__finish__.m warning: potential Matlab compatibility problem: # used as comment character near line 33 offile /opt/local/share/octave/3.4.3/m/startup/__finish__.m I'm afraid there are a number of .m files that go into this script, so it is not a simple thing to supply. I guess I'm hoping what I've given here is enough to generate some useful suggestions for how to end these warnings. Thomas L. Scofield -------------------------------------------------------- Associate Professor Department of Mathematics and Statistics Calvin College --------------------------------------------------------
|
[Prev in Thread] | Current Thread | [Next in Thread] |