Home > vbmeg > functions > tool_box > dynamics_movie > test_fig > basic_tool > load_connection.m

load_connection

PURPOSE ^

V{n} : vertex 3D coordinate for n-th connections

SYNOPSIS ^

function [V] = load_connection(d, p);

DESCRIPTION ^

 V{n} : vertex 3D coordinate for n-th connections

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    [V] = load_connection(d, p);
0002 % V{n} : vertex 3D coordinate for n-th connections
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 % number of connections
0008 NP = size(d.Vmni_from,2);
0009 
0010 % skip selection for connections
0011 V_from = d.Vmni_from(:,1:p.Nskip:NP);
0012 V_to   = d.Vmni_to(:,1:p.Nskip:NP);
0013 
0014 % number of connections to show
0015 NL = size(V_to,2);
0016 
0017 % divide V_from - V_to into inner points
0018 pdev = (1:p.Ndivide)'/p.Ndivide;
0019 
0020 X = pdev * V_to(1,:) + (1 - pdev) * V_from(1,:);
0021 Y = pdev * V_to(2,:) + (1 - pdev) * V_from(2,:);
0022 Z = pdev * V_to(3,:) + (1 - pdev) * V_from(3,:);
0023 
0024 
0025 V = cell(NL,1);% vertex coordinate for connections
0026 
0027 for n=1:NL
0028     V{n} = [X(:,n),Y(:,n),Z(:,n)];
0029 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005