Skip to content

Instantly share code, notes, and snippets.

clear all; close all;
%%%%%%%%%%%%%% Change path %%%%%%%%%%%%%%%%
filename_path = '/change/path/to/file/raw_touch_data.csv';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% Choose feature source %%%%%%%%%%%
add_accelerometer = false; % Adds accelerometer features
add_gyroscope = false; % Adds gyroscope features
add_magneticField = true; % Adds magnetic field features
add_gravity = false; % Adds gravity features
function feat = compute3axialFeat(data)
X = data(:,1); % X axis
Y = data(:,2); % Y axis
Z = data(:,3); % Z axis
XYZ = sqrt((X.^2+Y.^2+Z.^2));
% Compute mean, standard deviation, max and min features
feat = [mean(X) mean(Y) mean(Z) mean(XYZ) std(X) std(Y) std(Z) std(XYZ) max(X) max(Y) max(Z) max(XYZ) min(X) min(Y) min(Z) min(XYZ) ];
@doubleshow
doubleshow / README.md
Last active August 29, 2015 14:18
Pin
title author
How to craft a pin
Tom Yeh

The objective is to build a pin-like object that consists of two parts: a head and a body.

First, define the head as a cylinder using the ````

@doubleshow
doubleshow / index.xml
Last active August 30, 2015 15:19
Three Octopus
<craft>
<info>
<title>Three Octopuses</title>
</info>
<craft name="octopus" module="./octopus.stl"/>
<row>
<octopus></octopus>
<octopus t="scale(2)"></octopus>
<octopus t="scale(3)"></octopus>
JSONPickle({
"$type": "edu.colorado.permgrep.appData",
"packageName": "com.bbn.map",
"permissions": {
"$type": "scala.collection.immutable.Set[java.lang.String]",
"elems": [
{
"$type": "java.lang.String",
"value": "android.permission.ACCESS_FINE_LOCATION"
},
@doubleshow
doubleshow / index.xml
Last active August 30, 2015 15:19
Pyramid
<craft name="pyramid">
<info>
<title>Pyramid</title>
</info>
<param name="n" default="10" type="int"/>
<craft name="level">
<param name="d" default="5" type="int"/>
<cube size="{{d*5}} {{d*5}} 5"></cube>
</craft>
@doubleshow
doubleshow / index.xml
Last active August 30, 2015 15:19
pen holder
<craft>
<info>
<title>Twisted Pen Holder</title>
</info>
<param name="n" default="30" type="int"/>
<craft name="layer">
<g l="centerXY()">
<row spacing="25">
@doubleshow
doubleshow / index.xml
Last active August 29, 2015 14:19
Hello World
<craft>
<info>
<title>Hello World</title>
</info>
<stack>
<div>Hello World</div>
<cube size="60 15 2"></cube>
</stack>
</craft>
@doubleshow
doubleshow / index.xml
Last active August 30, 2015 15:19
Goodnight Cow Jumping Over the Moon
<craft>
<craft name="cow" stl="mycow.stl"/>
<craft name="moon" src="moon.xml"/>
<craft name="page">
<cube size="130 130 5"/>
</craft>
<craft name="picture">
<cow color='white' t="mirrorY() rotateZ(20) translate(0,10,0)"></cow>
<moon t="scale(3,3,1) translate(20,0,0)"></moon>
</craft>
@doubleshow
doubleshow / index.xml
Last active August 30, 2015 15:19
My Room
<craft>
<craft name="bed" module="@gist/calebhsu/e40a7ba21f36e89d6df6"/>
<craft name="dresser" module="@gist/calebhsu/e5bb4cc3eaa28023a3f5"/>
<craft name="chair" module="@gist/calebhsu/94467d71de5420ad2286"/>
<craft name="room">
<g align="z0">
<bed></bed>
<dresser x="50" y="60" drawers="5"></dresser>
<chair color="purple" x="50"></chair>