Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 8b5d22a
  • /
  • polarPlotVectorsMean2.m
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:baa4e61a46dce9ebfd56fb0aeb692835649be179
directory badge
swh:1:dir:8b5d22a1c70a6307bf823f0da316d829cef8307a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
polarPlotVectorsMean2.m
%% open up csv file containin the gain and phase

try
    pathname = cd;
    [~, filenameroot] = fileparts(pathname);
    File = [filenameroot '.xlsx'];
    [~, ~, array] = xlsread(File);
catch
    File = uigetfile('*.*');
    [~, ~, array] = xlsread(File);
    fprintf('Excel file not automatically found, please manually select file')
end

rLimits = [0, .3];
aa = figure()
lineW = 3;

% Find eyeHgain column
[gainX gainY] = find(strcmp(array, 'eyeHgain'));

% Find eyeHphase column
[phaseX phaseY] = find(strcmp(array, 'eyeHphase'));

% gather t=0 information
phaseT0Mean = mean(cell2mat(array(2:4, phaseY)));
gainT0Mean = mean(cell2mat(array(2:4, gainY)));

% gather t=30 information
phaseT30Mean = mean(cell2mat(array(16:18, phaseY)));
gainT30Mean = mean(cell2mat(array(16:18, gainY)));

% phase difference (original analysis)
phaseDiffPHASE = cell2mat(array(20, phaseY));
phaseDiffGAIN = cell2mat(array(20, gainY));

% phase subtraction (new analysis)
phaseSubPHASE = cell2mat(array(21, phaseY));
phaseSubGAIN = cell2mat(array(21, gainY));

% convert phase to radians
phaseT0Rad = deg2rad(phaseT0Mean);
phaseT30Rad = deg2rad(phaseT30Mean);
phaseDiffRad = deg2rad(phaseDiffPHASE);
phaseSubRad = deg2rad(phaseSubPHASE);

%% plot

T0 = polarplot([0 phaseT0Rad], [0 gainT0Mean], 'color', 'b', 'lineWidth', lineW);
hold on
T30 = polarplot([0 phaseT30Rad], [0 gainT30Mean], 'color', 'r', 'lineWidth', lineW);
PhaseSubtraction  = polarplot([0 phaseSubRad], [0 phaseSubGAIN], 'color', 'k', 'lineWidth', lineW);
PhaseDifference = polarplot([0 phaseDiffRad], [0 phaseDiffGAIN], 'color', 'g', 'lineWidth', lineW);
rlim(rLimits)

% add legend
legend([T0, T30, PhaseSubtraction, PhaseDifference], 'Time 0 Mean', 'Time 30 Mean', 'Phase Subtraction', 'Phase Difference',  'location', 'northeast')
title('T0, T30, Phase Subtraction, and Phase Difference Phase and Gain')

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API