# Category Archives: Programming

## Check if a file is a directory in Matlab, before 2018a

The new Matlab versions starting in 2018 rolled out a functioo called isfolder(filename), which is quite handy. But if you're using a version of Matlab before 2018a, you can still easily accomplish this task with the following code: exist(filename,'dir')==7 How does it work? Here, we are telling the exist function to look for the specified filename, and… Read More »

Share

## Plotting time graphs in R

Share    Send article as PDF

Share

## Concepts in Computational Neuroscience

Computational Neuroscience by Weights and States Motivation One of the simplest ways to model a neural network is to assume some basics Each neuron has a state. A neuron has input from multiple neurons. The effect is a weighted consideration of the input neurons. The network accumulates updates via a stepwise iteration of its components.… Read More »

Share

## R - frequency histogram with normal curve

Creating a histogram in R is a piece of cake. But often times, you'll want to take a look at the gaussian distribution that your data may represent. It's easy enough to look at the frequency histogram separately from the gaussian, but what if we want to overlay the gaussian on top of the histogram?… Read More »

Share

## R - color scatterplot points by density

Motivation If you've ever had lots of data to examine via a scatterplot, you may find it difficult due to overlapping points. For example, let's examine the following attempt to look at some (x,y) data. Impossible to understand, right? Solution Here's a much better solution. We will now color the points by their density. And… Read More »

Share

## R - Creating a heatmap from scatterplot data

Here's the code and the image it produces. (Full explanation of each line is below) For those that want the full tutorial, read from here: Suppose you have some (x,y,z) data and wish to plot it. Perhaps you have weather data for a grid layout of a city. Whatever the data may be, it's common… Read More »

Share

## Singly Linked List in Java

Implementing a Linked List in Java Here is a full implementation of a Singly Linked List in Java. A Link represents a single Node in the list. You'll notice that in this particular example, each Node stores two data, an integer and a double. Of course, your Nodes may store any type of data you… Read More »

Share