[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Behaviour of 'global', differences Octave/Matlab?
From: |
John W. Eaton |
Subject: |
Behaviour of 'global', differences Octave/Matlab? |
Date: |
Tue, 20 Feb 2007 01:44:11 -0500 |
If you think you've found a bug in Octave, please submit a complete
bug report to the address@hidden list. In this case, it would be
useful if you could submit a complete working example that could be
used to reproduce the problem.
I have no plans to do anything about this issue until I have a
complete example that I can run that demonstrates the problem.
Submitting a patch with a proposed fix would also be welcome.
jwe
On 19-Feb-2007, Andreas Romeyke wrote:
| -----BEGIN PGP SIGNED MESSAGE-----
| Hash: SHA1
|
| Hi all,
|
| I am trying[1] to run a Matlab toolbox (eeglab[2]) under Octave 2.9.9
| and Octave stops in the main-function eeglab() with following error:
|
| error: can't make function parameter `EEG' global
|
| error: evaluating global command near line 64, column 1
|
| error: near line 64 of file
| `/SCR/svn_work/eeglab-devel-5.03/eeglab5.03/functions/eeg_global.m'
|
| error: called from `eeglab' in file
| `/SCR/svn_work/eeglab-devel-5.03/eeglab5.03/eeglab.m'
|
|
| The original developers of the tool box uses an external m-file called
| eeg_global.m with
|
| % global variables
|
| % ----------------
|
| global EEG; % current dataset
|
| global ALLEEG; % all datasets
|
| global CURRENTSET; % current set index
|
| global ALLCOM; % all commands (history)
|
| global LASTCOM; % last command
|
| global STUDY;
|
| global CURRENTSTUDY;
|
|
| This file is called in the eeglab.m (around line 1700):
|
| [..]
|
| eeglab_options;
|
| if nargin == 1 && strcmp(onearg, 'redraw')
|
| if evalin('base', 'exist(''EEG'')', '0') == 1
|
| evalin('base', 'warning off; eeg_global; warning on;');
|
| end;
|
| end;
|
| eeg_global;
|
|
| % for the history function
|
| % ------------------------
|
| comtmp = 'warning off MATLAB:mir_warning_variable_used_as_function';
|
| evalin('base' , comtmp, '');
|
| evalin('caller', comtmp, '');
|
|
|
| evalin('base', 'eeg_global;');
|
| if nargin < 1 || exist('EEG') ~= 1
|
| clear global EEG ALLEEG CURRENTSET ALLCOM LASTCOM STUDY;
|
| CURRENTSTUDY = 0;
|
| eeg_global;
|
| EEG = eeg_emptyset;
|
| eegh('[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;');
|
| if get(0, 'screendepth') <= 8
|
| disp('Warning: screen color depth too low, some colors will be
| inaccurate in time-frequency plots');
|
| end;
|
| end;
|
| [..]
|
| Does it means the Octave does not allow making variables global by
| calling external m-file? What will be a workaround with less changes
| as possible to the original code? Any additional hints?
|
| Bye Andreas
|
| [1] ignoring the GUI stuff by using wrappers...
| [2] eeglab is a free toolbox to process eeg-data, the main-site is:
| http://sccn.ucsd.edu/eeglab/, we develop a testsuite to make a
| conversion to Octave possible (at least one or two years), see
| https://svnserv.cbs.mpg.de/eeglab
|
| - --
| Software Developer / Dipl. Inform. (FH)
| Max Planck Institute for Human Cognitive and Brain Sciences
| Department of Psychology
| Stephanstr. 1a, 04103 Leipzig, Germany
|
| -----BEGIN PGP SIGNATURE-----
| Version: GnuPG v1.4.6 (GNU/Linux)
|
| iD8DBQFF2XsRGBhgJGthyeERAhHpAJ0REffNB3oQBPH/bX5VOGuAAgH/nQCgsXpd
| gQVKHppd6574QJwN1wC8XwY=
| =6AlA
| -----END PGP SIGNATURE-----
|
| _______________________________________________
| Help-octave mailing list
| address@hidden
| https://www.cae.wisc.edu/mailman/listinfo/help-octave