clear all; % clc % Leemos el archivo de Matlab conteniendo las neuronas Num_File = 6; load(['Neurona_Matlab_', num2str(Num_File), '.mat']); % Ploteamos clc colores = {'r', 'b', 'm', 'k', 'g'}; % figure; % hold on; % for i = 1:length(AXON_Cell) % % Puntos_Axon = AXON_Cell{1, i}; % plot3( Puntos_Axon(:, 1), Puntos_Axon(:, 2), Puntos_Axon(:, 3), '-k', 'linewidth', 1.5 ); % xlabel('X'); % ylabel('Y'); % zlabel('Z'); % % zlim([150 200]); % % view([-96, -90]); % % axis equal % end % %% Calculamos los alpha óptimos para estimar la long total del axón de la long de la proyección en los tres planos clc % ---------------- Plano Proyección XY -------------------- [alpha_Opt.XY, Axon_Length, Axon_Length_Proyecc.XY] = Estim_Long_Axon_Proyeccion( AXON_Cell, 1, 2 ); % ---------------- Plano Proyección XZ -------------------- [alpha_Opt.XZ, Axon_Length, Axon_Length_Proyecc.XZ] = Estim_Long_Axon_Proyeccion( AXON_Cell, 1, 3 ); % ---------------- Plano Proyección YZ -------------------- [alpha_Opt.YZ, Axon_Length, Axon_Length_Proyecc.YZ] = Estim_Long_Axon_Proyeccion( AXON_Cell, 2, 3 ); % %% Isotropía de los ángulos esféricos h_Azim = 20; h_Elev = 10; [Entropy2D, AZIM, ELEV, Prob_Angles_2D, AZIM_Edges, ELEV_Edges] = Isotropia_Angulos_Esfericos( AXON_Cell, h_Azim, h_Elev ); % %% Isotropía de los ángulos en la proyección del axón h_Theta = 20; [Entropy_1D, THETA, Prob_Angles_1D, THETA_Edges] = Isotropia_Proyeccion( AXON_Cell, h_Theta ); % % %% % clc % % figure; % bar(THETA_Edges(1:end-1), Prob_Angles_1D.XY); % xlabel('Theta', 'fontsize', 15); % title( ['Neuron ', num2str(Num_File), '. Entropy XY = ', num2str(Entropy_1D.XY)], 'fontsize', 15 ); % %% Ploteamos el histograma AZIM_Centers = AZIM_Edges(1:end-1) + diff(AZIM_Edges)/2; ELEV_Centers = ELEV_Edges(1:end-1) + diff(ELEV_Edges)/2; [AA, EE] = meshgrid(AZIM_Centers, ELEV_Centers); figure('color', 'w'); surf(AA, EE, Prob_Angles_2D'); xlim([-170, 170]); ylim([-80, 80]); view([0, 90]) axis square xlabel('Azimuth (deg)', 'fontsize', 18); ylabel('Elevation (deg)', 'fontsize', 18); title(['Entropy = ', num2str(Entropy2D)], 'fontsize', 16); % colorbar %% figure; bar(AZIM_Centers, sum(Prob_Angles_1D.XY, 1)); xlabel('Theta', 'fontsize', 15); title( ['Neuron ', num2str(Num_File), '. Entropy XY = ', num2str(Entropy_1D.XY)], 'fontsize', 15 ); %% Alpha vs. Entropía de los ángulos esféricos Ent = [4.786 5.328 4.633 4.545]; Alp = [1.14 1.26 1.15 1.03]; figure; plot(Ent, Alp, 'o', 'markerfacecolor', 'b', 'markersize', 10); xlabel('Entropy 2D', 'fontsize', 16); ylabel('Alpha', 'fontsize', 16); %% %%%%%%%%%% %% % Entropy_3 = Entropy_1D; % alpha_Opt_3 = alpha_Opt; % Entropy_4 = Entropy_1D; % alpha_Opt_4 = alpha_Opt; % Entropy_5 = Entropy_1D; % alpha_Opt_5 = alpha_Opt; Entropy_6 = Entropy_1D; alpha_Opt_6 = alpha_Opt; %% Ploteamos Ent_XY = [Entropy_3.XY, Entropy_4.XY, Entropy_5.XY, Entropy_6.XY]; Ent_XZ = [Entropy_3.XZ, Entropy_4.XZ, Entropy_5.XZ, Entropy_6.XZ]; Ent_YZ = [Entropy_3.YZ, Entropy_4.YZ, Entropy_5.YZ, Entropy_6.YZ]; Alp_XY = [alpha_Opt_3.XY, alpha_Opt_4.XY, alpha_Opt_5.XY, alpha_Opt_6.XY]; Alp_XZ = [alpha_Opt_3.XZ, alpha_Opt_4.XZ, alpha_Opt_5.XZ, alpha_Opt_6.XZ]; Alp_YZ = [alpha_Opt_3.YZ, alpha_Opt_4.YZ, alpha_Opt_5.YZ, alpha_Opt_6.YZ]; figure; hold on; plot(Ent_XY, Alp_XY, 'o', 'markerfacecolor', 'b', 'markersize', 10); plot(Ent_XZ, Alp_XZ, 'o', 'markerfacecolor', 'r', 'markersize', 10); plot(Ent_YZ, Alp_YZ, 'o', 'markerfacecolor', 'k', 'markersize', 10); xlabel('Entropy 1D', 'fontsize', 16); ylabel('Alpha', 'fontsize', 16); legend('XY', 'XZ', 'YZ');