% Calcualte the linear offset from data and find RMS


for i=1:3
    offset_value(1,i) = mean(SignalNoise(:,i));
    %detrend_value(:,i) = detrend(SignalNoise(:,i));
    accel(:,i) = SignalNoise(:,i)-offset_value(1,i);
    accel_RMS(1,i) = rms(accel(:,i));
end

% After removing average offset
figure;
plot(accel(:,1), 'r');
grid

figure;
plot(accel(:,2), 'g');
grid

figure;
plot(accel(:,3), 'b');
grid


% Raw Data
figure;
plot(SignalNoise(:,1), 'r');
grid

figure;
plot(SignalNoise(:,2), 'g');
grid

figure;
plot(SignalNoise(:,3), 'b');

accel_RMS