1% =========================================================================== %
2%> @brief returns the path to the data folder
4%> measured sensor data is stored in the data folder. The data folder is located
5%> in the OneDrive folder of moss. Since the exact location of the OneDrive
6%> folder depends on the computer name,
this function returns the path to the
7%> data folder depending on the computer name. This function is used by the
8%> functions that load the sensor data.
12%> @retval dataPath - path to the data folder
14%> @remark Ask moss to get access to the data folder. In some later time, the
15%> data folder will pobbibly will have been moved to a different location, e.g.
16%> to the strassburg server. In
this case, the function has to be adapted.
20%> @copyright see the file @ref LICENSE in the root directory of the repository
21% =========================================================================== %
23% GET_DATA_PATH Returns the path to the data folder.
25% Returns the path to the data folder depending on the computer name.
26% If the computer name is unknown, an error is thrown.
29% dataPath = get_data_path();
32% dataPath - Path to the data folder.
34% See also: system, strtrim,
switch, error
36% For LICENSE / TERMS OF USE, see the file LICENSE in the root directory of the repository.
39% Get the computer name
40[~, computerName] = system(
'hostname');
41computerName = strtrim(computerName);
43% Determine the data path based on the computer name
45 case 'Simons-Macbook.lan'
46 dataPath =
'/Users/simonmoser/Library/CloudStorage/OneDrive-ZHAW/MT/Measurements';
47 case 'simons-macbook.lan.zhaw.ch'
48 dataPath =
'/Users/simonmoser/Library/CloudStorage/OneDrive-ZHAW/MT/Measurements';
50 dataPath =
'C:\Users\moss\OneDrive - ZHAW\MT\Measurements';
52 error(
'Unknown computer name: %s', computerName);