% This MATLAB script is used to test the third hypothesis which is to compare % comfort levels of the HR-ARM and DM, and also to prepare the Table 3. % Comparison of DM and HR-ARM subjective post-hoc test assessment levels % were on a visual analog scale from 1 to 10, with ‘1’ labeled ‘unbearable’ % and ‘10’ representing ‘very acceptable’. % NOTE: Make sure "Survey_Data.xlsx" exists in the current folder. % Written by Ali Attari (attari@umich.edu) - MATLAB R2018a (academic use) % Biomechanics Research Lab., College of Engineering % University of Michigan % Updated on 10/25/2020 % Initialization clear variables; close all; clc; % Loading data from spreadsheet file data = xlsread ('Survey_Data','Survey','B3:L18'); % HR-ARM HRARM.Comfort = data(:,1); HRARM.Smoothness = data(:,2); HRARM.Shape = data(:,3); HRARM.Size = data(:,4); HRARM.Duration = data(:,5); % DM DM.Comfort = data(:,6); DM.Smoothness = data(:,7); DM.Shape = data(:,8); DM.Size = data(:,9); DM.Duration = data(:,10); % Mann-Whitney U-Test alpha = 0.01; [p.Comfort, h.Comfort, stats.Comfort] = ranksum(DM.Comfort,HRARM.Comfort,'alpha',alpha,'tail','both','method','exact'); [p.Smoothness, h.Smoothness, stats.Smoothness] = ranksum(DM.Smoothness,HRARM.Smoothness,'alpha',alpha,'tail','both','method','exact'); [p.Shape, h.Shape, stats.Shape] = ranksum(DM.Shape,HRARM.Shape,'alpha',alpha,'tail','both','method','exact'); [p.Size, h.Size, stats.Size] = ranksum(DM.Size,HRARM.Size,'alpha',alpha,'tail','both','method','exact'); [p.Duration, h.Duration, stats.Duration] = ranksum(DM.Duration,HRARM.Duration,'alpha',alpha,'tail','both','method','exact'); % Diplaying p-values disp('DM vs. HR-ARM comfort comparisson (P-value):'); disp(p); % p-value