I code a C# desktop program on windows and some matlab programs on a linux server.How could I achieve — select local data using the C# program and then transfer the data to the matlab programs.After the data processed on the linux server,the results will be sent to the C# desktop program? Answer Request
I would start by trying the following 'recipe'. First make sure you have ssh access to the server.
Process
class to send command-line execution command.-r
useful, to start Matlab and call a script.scp
, the easiest thing to do is to try and copy it inside a loop until the copying succeeds, with some pause between tries, and an upper limit of the time (in case something goes wrong on the server side, you wouldn't want to wait forever). If you want to make it less 'dirty', you could establish a tcp client-server connection between the remote and local machine, and have the remote machine send a message once the file is ready for copying. You could even get the data over tcp, instead of saving to file, if it's not too much data.