Back to the main page.
Bug 2600 - slice plot fails when nslices=1
Status | CLOSED FIXED |
Reported | 2014-06-04 10:53:00 +0200 |
Modified | 2014-06-18 12:29:59 +0200 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
- 2014-06-04 10:53:13 +0200
Hey all I want to plot a single slice using ft_sourceplot. here's my cfg: method: 'slice' funparameter: 'avg.pow' funcolorlim: [-0.2000 0.2000] slicerange: [49 50] nslices: 1 here's the error: ??? Attempted to access dim(3); index out of bounds because numel(dim)=2. Error in ==> ft_sourceplot at 1122 M = ceil(sqrt(dim(3))); here's the fix: In ft_sourceplot from line 1120 m = dim(1); n = dim(2); M = ceil(sqrt(dim(3))); N = ceil(sqrt(dim(3))); should be m = dim(1); n = dim(2); if numel(dim)==2 dim(3)=1 end M = ceil(sqrt(dim(3))); N = ceil(sqrt(dim(3)));