how to run powershell command

13 views (last 30 days)
mastore beic
mastore beic on 30 Sep 2019
i have 2 computers wich are in a LAN. i want to send maveproxy commands from one to the other.
i have a program called MAVproxy and i can send my command using powershell.
"mavproxy.exe --master=tcp:169.254.164.252:5762"
when i want to send it from matlab i use:
!powershell mavproxy.exe --master=tcp:169.254.164.252:5762;echo 'This is a line';
it works fine and connect 2 computers. but when i want to do the rest of the code, it doesn't work and get stuck in first line.i mean it goes to powershell mode and doesn't return to matlab code.
!powershell mavproxy.exe --master=tcp:169.254.164.252:5762;echo 'This is a line';
%some executions to find x;
x=1500;
!powershell mode guided;echo 'This is a line';
!powershell rc 3 x;echo 'This is a line';
it doesn't the execution or anything else after the first line.
i even tried :
!powershell -inputformat none mavproxy.exe --master=tcp:169.254.164.252:5762;echo 'This is a line';
but it didn't help because the problem is that the mavproxy command still running and i want it to still running while i'm doing the rest(i don't want to lose the connection)

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!