Using a reed switch with Arduino

Hello,
I am trying to use Arduino to log the frequency of pulses from a reed switch. The switch is inside a vortex wind sensor that actuates as the sensor spins --http://www.inspeed.com/anemometers/Vortex_Wind_Sensor.asp

here is my code:
#define LED 13 //pin for the LED indicator (green)
#define PULSESWITCH 1 //pin for the switch

int val=0; //sets variable "val" initially at zero "val" stores the state of the input pin
unsigned long time;

void setup(){
pinMode(LED,OUTPUT); //the LED is an output (light)
pinMode(PULSESWITCH,INPUT); //the switch is an input (current)
}

void loop(){
val=digitalRead(PULSESWITCH); //senses what the switch is doing
//check if the input is HIGH (switch on)
if (val==HIGH){
digitalWrite(LED, HIGH); //turns LED on if switch is on

}else{
digitalWrite(LED,LOW); //otherwise it turns the LED off

}
time=pulseIn(PULSESWITCH,HIGH,1);//takes the time between pulses at a sample rate of 1 sample/ms
Serial.print(time); // prints the time since program started
delay(1); // delay between prints (1 ms)
}

Here is how everything is laid out:

Pretty simple, but the LED is always on no matter what. I suspect a faulty reed switch since at one point i had it working.

Also, I am using the pulsein command to gather data of the pulses, but how can I export this into a readable format to be used in MATLAB?

Thank you