[FieldTrip] 2D surface spline interpolation
ingenieur eniso
ingenieureniso at gmail.com
Thu Jul 18 17:02:34 CEST 2013
Hi ,
I use the splint.m function to implement the spherical spline
interpolation. But an error is occured:
??? Error using ==> rdivide
Matrix dimensions must agree.
Error in ==> splint at 58
elc1 = elc1 ./ repmat(sqrt(sum(elc1.^2,2)), 1, 3);
Error in ==> eeg_interp_sph_spline_test at 50
[V2, L2, L1] = splint(elc1, V, elc2)
I have written following program in Matlab
elc1=[x y z]';
elc2=[0.430 0.050 -0.010]';
[V2, L2, L1] = splint(elc1, V, elc2)
with
[x y z]=[-0.0176 0.0907 0.0071
0.0024 0.0924 0.0076
0.0284 0.0879 0.0075
-0.0085 0.0903 0.0190
0.0153 0.0895 0.0189
-0.0391 0.0836 0.0089
-0.0156 0.0868 0.0286
0.0299 0.0823 0.0305
0.0559 0.0735 0.0080
-0.0329 0.0805 0.0321
-0.0043 0.0789 0.0485
0.0155 0.0785 0.0468
0.0462 0.0726 0.0344
-0.0618 0.0683 0.0105
-0.0509 0.0719 0.0289
-0.0418 0.0694 0.0451
-0.0200 0.0725 0.0542
0.0040 0.0690 0.0618
0.0332 0.0657 0.0563
0.0507 0.0593 0.0501
0.0674 0.0552 0.0315
0.0770 0.0510 0.0080
-0.0651 0.0617 0.0234
-0.0560 0.0608 0.0420
-0.0406 0.0598 0.0580
-0.0080 0.0579 0.0720
0.0196 0.0538 0.0729
0.0444 0.0515 0.0631
0.0678 0.0422 0.0471
0.0803 0.0412 0.0213
-0.0738 0.0546 -0.0128
-0.0782 0.0496 0.0047
-0.0692 0.0506 0.0353
-0.0518 0.0466 0.0611
-0.0288 0.0444 0.0761
0.0018 0.0412 0.0830
0.0296 0.0370 0.0797
0.0582 0.0294 0.0659
0.0799 0.0258 0.0392
0.0902 0.0207 0.0049
0.0842 0.0364 -0.0135
-0.0831 0.0366 0.0188
-0.0709 0.0332 0.0497
-0.0493 0.0303 0.0724
-0.0187 0.0239 0.0876
0.0157 0.0212 0.0889
0.0488 0.0165 0.0771
0.0758 0.0093 0.0526
0.0905 0.0016 0.0200
-0.0846 0.0327 -0.0191
-0.0914 0.0153 -0.0017
-0.0851 0.0124 0.0345
-0.0648 0.0150 0.0646
-0.0401 0.0047 0.0834
0.0295 -0.0054 0.0877
0.0596 -0.0112 0.0701
0.0821 -0.0158 0.0400
0.0916 -0.0140 0.0023
0.0909 0.0050 -0.0172
-0.0913 -0.0021 0.0158
-0.0805 -0.0014 0.0459
-0.0562 -0.0090 0.0732
-0.0215 -0.0170 0.0885
0.0119 -0.0205 0.0896
0.0468 -0.0289 0.0746
0.0717 -0.0317 0.0494
0.0852 -0.0321 0.0173
-0.0856 -0.0313 -0.0167
-0.0906 -0.0195 -0.0002
-0.0861 -0.0199 0.0279
-0.0681 -0.0230 0.0585
-0.0375 -0.0303 0.0791
-0.0029 -0.0388 0.0841
0.0277 -0.0432 0.0772
0.0560 -0.0450 0.0586
0.0738 -0.0459 0.0322
0.0801 -0.0466 0.0005
0.0692 -0.0591 -0.0177
-0.0828 -0.0397 0.0127
-0.0751 -0.0381 0.0389
-0.0556 -0.0426 0.0607
-0.0218 -0.0555 0.0709
0.0119 -0.0587 0.0707
0.0402 -0.0598 0.0583
0.0588 -0.0606 0.0383
0.0698 -0.0602 0.0099
-0.0681 -0.0592 -0.0211
-0.0770 -0.0512 -0.0056
-0.0725 -0.0542 0.0200
-0.0626 -0.0544 0.0415
-0.0372 -0.0663 0.0531
-0.0075 -0.0692 0.0613
0.0157 -0.0732 0.0547
0.0438 -0.0705 0.0413
0.0567 -0.0703 0.0209
0.0630 -0.0678 -0.0043
0.0545 -0.0723 -0.0201
-0.0558 -0.0683 0.0284
-0.0226 -0.0794 0.0421
0.0036 -0.0823 0.0425
0.0386 -0.0810 0.0235
-0.0654 -0.0655 0.0051
-0.0452 -0.0802 0.0113
-0.0322 -0.0824 0.0276
-0.0078 -0.0884 0.0267
0.0175 -0.0876 0.0247
0.0282 -0.0877 0.0104
0.0510 -0.0772 0.0057
-0.0193 -0.0900 0.0110
0.0060 -0.0919 0.0105
-0.0556 -0.0736 -0.0089
-0.0287 -0.0879 -0.0060
-0.0054 -0.0924 -0.0056
0.0148 -0.0913 -0.0057
0.0422 -0.0820 -0.0095
-0.0168 -0.0899 -0.0149
0.0059 -0.0913 -0.0151
-0.0258 -0.0854 -0.0253
-0.0063 -0.0889 -0.0255
0.0142 -0.0880 -0.0254
-0.0398 0.0828 -0.0126
-0.0116 0.0913 -0.0111
0.0115 0.0914 -0.0103
0.0378 0.0841 -0.0101]
V =
[3.3540
1.9345
0.5927
2.6217
1.3858
5.1010
3.2264
0.3127
-1.2031
4.8916
2.2626
0.7324
-0.8725
8.8664
7.1630
5.9588
3.6880
1.7445
-0.4065
-1.4554
-2.5648
-2.8607
9.7859
8.1602
5.9181
2.3645
0.3716
-1.0117
-2.4332
-3.0173
9.7933
11.8346
10.4268
7.4601
4.5098
1.8013
-0.3755
-1.7671
-2.9153
-3.5252
-3.2862
13.3333
10.0548
6.8787
3.4798
0.8774
-0.9168
-2.3297
-3.1422
11.8833
13.2409
11.6124
8.3419
4.8045
0.6147
-0.8466
-2.0623
-2.8388
-3.2469
12.1843
9.6097
6.2738
3.3943
1.4797
0.0743
-1.2483
-2.0240
8.5136
10.3840
9.7096
7.3371
4.4194
2.6834
1.0785
-0.2747
-1.3383
-1.4970
-0.4476
8.3757
7.6361
5.7288
3.4908
1.8043
0.7450
-0.1646
-0.7976
6.1441
7.2345
7.0914
6.2035
4.1770
2.5408
1.8116
0.3820
-0.1287
-0.4707
0.2793
5.3026
3.5360
2.1660
0.7409
6.1342
4.4963
3.6572
2.5199
1.7607
1.3430
0.4600
3.2784
2.1011
5.2801
3.5401
2.6195
2.0038
0.7776
3.1047
2.2821
3.3528
2.6710
1.9100
5.1250
2.9475
1.6662
0.1915]
I haven't found a solution though. So, what is wrong?
Thanks a lot in advance!
Best,
ahmed
2013/7/17 ingenieur eniso <ingenieureniso at gmail.com>
> Hi Jörn and jan-mathijs,
>
>
> thank you very much for help.
>
> All the best
> Ahmed
>
>
> 2013/7/16 jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>
>
>> Hi Ahmed,
>>
>> For the visualization of sensor topographies, fieldtrip relies on the
>> 'griddata' function from matlab. You can type 'doc griddata' on the matlab
>> command line for more information. Note that this is not a function that is
>> specific to fieldtrip.
>>
>> For actual interpolation of data, FieldTrip has a ft_channelrepair
>> function, which implements (among others) a spherical spline interpolation.
>>
>>
>> Best wishes,
>> Jan-Mathijs
>>
>> On Jul 16, 2013, at 2:11 PM, ingenieur eniso wrote:
>>
>> Dear all,
>> I am working on spatiotemporal mapping of 2D and 3D EEG data.
>> I want to develop the method of surface interpolation, what is the
>> function in FieldTrip that develops this interpolation method.
>>
>> I hope you will send me positive and helpful response.
>>
>> Thanks a lot in advance!
>>
>> Best,
>>
>> ahmed
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>> Jan-Mathijs Schoffelen, MD PhD
>>
>> Donders Institute for Brain, Cognition and Behaviour,
>> Centre for Cognitive Neuroimaging,
>> Radboud University Nijmegen, The Netherlands
>>
>> Max Planck Institute for Psycholinguistics,
>> Nijmegen, The Netherlands
>>
>> J.Schoffelen at donders.ru.nl
>> Telephone: +31-24-3614793
>>
>> http://www.hettaligebrein.nl
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130718/5d7f0400/attachment-0002.html>
More information about the fieldtrip
mailing list