Revision 887149dbc4bb495e72f3413f6766f52a7cd123e5 authored by TritschLab on 19 May 2021, 15:07:52 UTC, committed by GitHub on 19 May 2021, 15:07:52 UTC
1 parent 6439ab6
Raw File
updateAllDeleteNormDFUI.m
%% Summary:
% 
% This script opens and updates all selected files to delete the normDF
% fields.
% 
% Inputs:
% 
% User-selected .mat file names
%
% Outputs:
% 
% Updated data structure, re-saved under its original name in the .mat file
% 
% Author: Jeffrey March, 2018

%% Main Code

[trials] = uigetfile('*.mat','MultiSelect','on');

cd('C:\MATLAB\Calcium Data\')
totalFiles = 0;

for trial = 1:length(trials);
	load(trials{trial});                               
	totalFiles = totalFiles + 1
    if isfield(data, 'normDF1')
        data = rmfield(data,'normDF1');
        data = rmfield(data,'normDF2');
        data = rmfield(data,'normDF3');
    end
    
    save(trials{trial},'data')  
                    
end
back to top