Run telnet with cmd in MATLAB command window
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Martin
el 29 de Jun. de 2011
Respondida: Gregor Dempke
el 19 de Oct. de 2019
Hey, I have some trouble with using the command interface in MATLAB.
When I run system('cmd'), the command prompt starts and is displayed in the matlab command window. When I now type telnet at the cursor position in my matlab command window, it does not know the command 'telnet'. When I start telnet in the normal windows command window without any matlab stuff, everything works fine with that command.
What can be wrong with that?
Thanks, Martin
0 comentarios
Respuesta aceptada
Jason Ross
el 1 de Jul. de 2011
I think I figured out what is going on. The "telnet" client seems to set up some sort of terminal environment, which doesn't play well with the way that the MATLAB command window is working. If I try the following, nothing useful happens.
>> system('cmd')
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
c:\Temp>telnet
telnet
If I get what you are trying to do, I believe you need to use the "plink" command, which is part of the PuTTY suite, which is freely available (google "download putty"). When I use that, I get a usable prompt:
>> system('cmd')
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
c:\Temp>"c:\program files (x86)\putty\plink.exe" -telnet myunixhost
"c:\program files (x86)\putty\plink.exe" -telnet myunixhost
myunixhost login: <enter my login here>
Password: <enter password>
2 comentarios
Más respuestas (3)
Walter Roberson
el 29 de Jun. de 2011
MATLAB has set the PATH environment variable differently than you are expecting.
echo $PATH
You can set the PATH inside of MATLAB by using setenv('PATH',newpath)
0 comentarios
Martin
el 30 de Jun. de 2011
1 comentario
Walter Roberson
el 30 de Jun. de 2011
Sorry, I will be busy today and will not have time to explain; someone else should be able to assist you.
Ver también
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!