Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

MATLAB and serial communication

Status
Not open for further replies.

ho907

Junior Member level 1
Joined
Mar 2, 2010
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,400
Hi,
I need help regarding serial communication using MATLAB. I know to open a serial communication the code is

obj = serial('COM1')
which configures the com port1 for serial communication. But if I want to change the code such way that

obj = serial('COMX')

where X is the number entered on a text box. For example if 2 is entered on a textbox so
X=2 and obj = serial('COM2'), which configures com port 2 for communication.
Please tell me how do I do that in matlab code. I have tried several ways but none of them worked.

Thanks in advance.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top