XBee Connection to computer

I currently have a function in matlab that reads data from a sensor connected to my computer and then sends motor commands to the motors via serial connection. I am trying to make this serial connection wireless using an arduino uno board and 2 XBee chips. The motor encoders take ascii commands (i.e. you send 'en' to enable and 'v100' to command 100 rpm). I have the XBee's programmed to be communicate with each other. The code below is what I have downloaded to my Arduino Uno board. I have my Uno/Xbee combo connected to my motors and the second XBee connected via USB to my computer. However, if I try to run my Matlab program, nothing happens. Do I have my Arduino code correctly setup to run this type of system? Also, I can only upload the Arduino code to the Uno if I do not have the XBee attached, if that's of any importance. Any help would be appreciated. Thanks.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
Serial.begin(9600);
mySerial.begin(9600);

}

void loop()
{
if (mySerial.available())
Serial.print(mySerial.read());
if (Serial.available())
mySerial.print(Serial.read());
}

I have my Uno/Xbee combo connected to my motors

Is the XBee just duct-taped to the Arduino or do you have some kind of shield? If so, which one? If not, how does the over-the-air data get to pins 10 and 11?

If you open the Serial Monitor, and send stuff, do you get a response?

Sometimes a read character turns into a decimal integer.
Try this:

if (mySerial.available())
    Serial.print( (char) mySerial.read());
  if (Serial.available())
    mySerial.print( (char) Serial.read());

I am using the XBee Shield. I am completely new to Arduino if you haven't noticed. I programmed both XBee chips in PuTTy but I have no idea how to verify they are actually communicating.