Skip to content

Instantly share code, notes, and snippets.

View valentina-s's full-sized avatar

Valentina Staneva valentina-s

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function dataset = cluster_volumes(s)
for vol = 1:10
trials = s.timeSeriesArrayHash.value{vol+1}.trial;
% times = s.timeSeriesArrayHash.value{volume+1}.time;
% rel_dF = s.timeSeriesArrayHash.value{volume+1}.valueMatrix;
trial_ids = unique(trials);
function dataset = createDatasetForVolume(s, volume, filename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@valentina-s
valentina-s / clustering_script.m
Created May 18, 2016 21:08
Basic Clustering of Svoboda Lab Data
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This script performs clustering of the trials by first reducing the
% dimension with classical multidimensional scaling, and then running
% kmeans clustering. The clustered trials are visualized by plotting
% the first two (MDS) dimensions.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% read the data
@valentina-s
valentina-s / GoogleMapCalls.html
Created March 19, 2016 22:51
JavaScript Snippet displaying a map and directions of a location in Seattle (based on the name)
<!DOCTYPE html>
<html>
<body>
<p>Discovery Park</p>
<button onclick="showMap('Discovery Park')">View Map</button>
<button onclick="showDirections('Discovery Park')">View Directions</button>