Back to the main page.
Bug 1879 - ft_plot_vector breaks because it needs iscolumn
Status | CLOSED FIXED |
Reported | 2012-12-10 16:15:00 +0100 |
Modified | 2014-03-12 12:21:42 +0100 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P3 normal |
Assigned to: | Jörn M. Horschig |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jörn M. Horschig - 2012-12-10 16:15:14 +0100
??? Undefined function or method 'iscolumn' for input arguments of type 'double'. Error in ==> ft_plot_vector at 74 if iscolumn(vdat), Error in ==> ft_connectivityplot at 127 ft_plot_vector(tmp, 'width', 1, 'height', 1, 'hpos', ix.*1.2, 'vpos', iy.*1.2, 'vlim', cfg.zlim, 'box', 'yes', 'color', cfg.color(1)); there is no function iscolumn (mentat, matlab2009b)
Jan-Mathijs Schoffelen - 2012-12-10 16:17:30 +0100
there is one in version 2010b, hehehe.
Jörn M. Horschig - 2012-12-10 16:27:54 +0100
oh, you have a version it? Would you mind creating an FT version out that then? :P
Robert Oostenveld - 2012-12-10 16:29:11 +0100
"svn blame ft_plot_vector.m" (*) shows the following *) this is something I just learned as useful svn command. 1 roboos 3652 roboos if nargin>1 && all(cellfun(@isnumeric, varargin(1:2)) | cellfun(@islogical, varargin(1:2))) 1 roboos % the function was called like plot(x, y, ...) 1 roboos hdat = varargin{1}; 1 roboos vdat = varargin{2}; 1 roboos varargin = varargin(3:end); 1 roboos else 1 roboos % the function was called like plot(y, ...) 1 roboos vdat = varargin{1}; 6403 jansch if iscolumn(vdat), 6403 jansch hdat = 1:size(vdat,1); 6403 jansch else 6403 jansch hdat = 1:size(vdat,2); 6403 jansch end 1 roboos varargin = varargin(2:end); 1 roboos end 1 roboos
Robert Oostenveld - 2012-12-10 16:30:50 +0100
(In reply to comment #1) in 2010a >> iscolumn ??? Undefined function or variable 'iscolumn'. See http://fieldtrip.fcdonders.nl/code_guidelines#ensure_that_it_runs_on_older_matlab_versions
Jörn M. Horschig - 2012-12-10 16:31:42 +0100
ha! btw, I solved it by checking size(vdat, 1) > 1 rather than iscolumn
Jörn M. Horschig - 2012-12-10 16:32:03 +0100
but didn't commit, should I?
Jan-Mathijs Schoffelen - 2012-12-10 16:34:00 +0100
go ahead