博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
matlab saveas 文件名无效,一直出现错误使用save,文件无法写入
阅读量:6904 次
发布时间:2019-06-27

本文共 2650 字,大约阅读时间需要 8 分钟。

%% set paths

addpath('D:/TE/TRENTOOL3-master')

addpath('D:/TE/fieldtrip-20150422');

ft_defaults;

%% define data paths

OutputDataPath = 'D:/';

InputDataPath  = 'exampledata/lorenz_1-2_45ms.mat';

load(InputDataPath);

%% define cfg for TEprepare.m

cfgTEP = [];

% data

cfgTEP.toi                 = [min(data.time{1,1}),max(data.time{1,1})]; % time of interest

cfgTEP.sgncmb              = {'A1' 'A2'};  % channels to be analyzed

% scanning of interaction delays u

cfgTEP.predicttimemin_u    = 40;      % minimum u to be scanned

cfgTEP.predicttimemax_u    = 50;      % maximum u to be scanned

cfgTEP.predicttimestepsize = 1;       % time steps between u's to be scanned

% estimator

cfgTEP.TEcalctype  = 'VW_ds'; % use the new TE estimator (Wibral, 2013)

% ACT estimation and constraints on allowed ACT(autocorelation time)

cfgTEP.actthrvalue = 100;   % threshold for ACT

cfgTEP.maxlag      = 1000;

cfgTEP.minnrtrials = 15;   % minimum acceptable number of trials

% optimizing embedding

cfgTEP.optimizemethod ='ragwitz';  % criterion used

cfgTEP.ragdim         = 2:9;       % criterion dimension

cfgTEP.ragtaurange    = [0.2 0.4]; % range for tau

cfgTEP.ragtausteps    = 5;        % steps for ragwitz tau steps

cfgTEP.repPred        = 100;      % size(data.trial{1,1},2)*(3/4);

% kernel-based TE estimation

cfgTEP.flagNei = 'Mass' ;           % neigbour analyse type

cfgTEP.sizeNei = 4;                 % neigbours to analyse

%% define cfg for TEsurrogatestats_ensemble.m

cfgTESS = [];

% use individual dimensions for embedding

cfgTESS.optdimusage = 'indivdim';

% statistical and shift testing

cfgTESS.tail           = 1;

cfgTESS.numpermutation = 5e4;

cfgTESS.shifttesttype  ='TEshift>TE';

cfgTESS.surrogatetype  = 'trialshuffling';

% results file name

cfgTESS.fileidout  = strcat( OutputDataPath,'Lorenzdata_1->2_');

%% calculation - scan over specified values for u

TGA_results = InteractionDelayReconstruction_calculate(cfgTEP,cfgTESS,data);

save([ OutputDataPath 'Lorenz_1 ->2 _TGA_results . mat '],'TGA_results');

%% optional: perform a post hoc correction for cascade effects and simple common drive effects

cfgGA = [];

cfgGA.threshold = 3;

cfgGA.cmc       = 1;

TGA_results_GA = TEgraphanalysis(cfgGA,TGA_results);

save([ OutputDataPath 'Lorenz_1 ->2 _TGA_results_analyzed_GA . mat'],'TGA_results_GA');

%% plotting

load('exampledata/lorenz_layout.mat');

cfgPLOT = [];

cfgPLOT.layout        = lay_Lorenz;         % see fieldtrip's ft_prepare_layout.m

cfgPLOT.electrodes    = 'highlights';

cfgPLOT.statstype     = 1;           % 1: corrected; 2:uncorrected; 3: 1-pval; 4:rawdistance

cfgPLOT.alpha         = 0.05;

cfgPLOT.arrowpos      = 1;

cfgPLOT.showlabels    = 'yes';

cfgPLOT.electrodes    = 'on';

cfgPLOT.hlmarker      = 'o';

cfgPLOT.hlcolor       = [0 0 0];

cfgPLOT.hlmarkersize  = 4;

cfgPLOT.arrowcolorpos = [1 0 0];

figure;

TEplot2D(cfgPLOT,TGA_results_GA)

转载地址:http://dtodl.baihongyu.com/

你可能感兴趣的文章
nginx虚拟主机配置
查看>>
关于对char类型数据赋予负值的汇编表现
查看>>
润乾报表在proxool应用下的数据源配置
查看>>
Python基础23_os,sys,序列化,pickle,json
查看>>
python MVC、MTV 框架介绍 Django 模板系统常用语法
查看>>
Day06
查看>>
C语言结构体在内存中的存储情况探究------内存对齐
查看>>
wamp版本升级小问题记录
查看>>
去中心化
查看>>
win10安装MarkdownPad 2报错This view has crashed的处理及md简单语法
查看>>
Unity3D - 设计模式 - 工厂模式
查看>>
第二十六课:jQuery对事件对象的修复
查看>>
Leetcode题目:Swap Nodes in Pairs
查看>>
Windows聚焦转为图片
查看>>
POJ NOI0101-09 字符菱形
查看>>
jQuery--停止动画和判断是否处于动画状态stop()
查看>>
iPhone 物理尺寸与分辨率
查看>>
win10系统下cmd输入一下安装的软件命令提示拒绝访问解决办法
查看>>
OpenJudge/Poj 1004 Financial Management
查看>>
面向服务(接口)开发过程中常用的实体类数据复制解决方案
查看>>