-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenQCMmain.m
More file actions
28 lines (22 loc) · 756 Bytes
/
openQCMmain.m
File metadata and controls
28 lines (22 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function [QCMStruct] = openQCMmain(PathToQCMtxt)
% Calculating QCM frequencies using
% 1) QCM data importer
% 2) QCM data export plateau
%% Checking whether PathToQCMtxt is valid
if exist('PathToQCMtxt') == 0
[file,path] = uigetfile('*.txt');
if isequal(file,0)
disp('User selected Cancel');
end
PathToQCMtxt = [path file];
elseif exist('PathToQCMtxt') == 7
PathToQCMtxt = dir([PathToQCMtxt '*.txt']);
elseif exist('PathToQCMtxt') == 1
if PathToQCMtxt(end) ~= '/' || PathToQCMtxt(end) ~= '\'
PathToQCMtxt = dir([PathToQCMtxt '/*.txt']);
else
PathToQCMtxt = dir([PathToQCMtxt '*.txt']);
end
end
%% Import text document
[QCMdata] = openQCMtxtimporter(PathToQCMtxt);