I'm using Matlab 2013a. The unix command './' doesn't work in matlab and returns the following error.
>> unix('./makeBeamxy.s')
'.' is not recognized as an internal or external command,
operable program or batch file.
Is there a way to solve it? I'm actually running this command from cygwin. But the 'system' command doesn't work very well because after I run this command, I need to keep the cgywin window open to run another command so that I can execute the file.
Try
unix(fullfile('.','makeBeamxy.s'))
Related
I installed an application named lqns in the path: /home/robb/Research/dist/lqns-6.2/lqns (lqns is a folder containing the executable lqns). I want the program to be executed in command line simply calling lqns in the shell, I solved this adding to the file ~/.bashrc the line:
export PATH=$PATH:/home/robb/Research/dist/lqns-6.2/lqns
And it works with no issue. I am now trying to execute this program inside a Matlab script, running:
[status, ~] = system("lqns " + filename, '-echo');
Where filename is the path of an input file. I get the error message:
/bin/bash: line 1: lqns: command not found
Running the exact same command with the shell I get no error: the program runs with no problem generating the relative output.
Running getenv('PATH'); in Matlab and printenv PATH on my OS shell I indeed get two different results: Matlab does't have the path to lqns. I even tried editing manually the files /etc/environment, /etc/bash.bashrc and /root/.bashrc, with no result. How can I solve this issue?
you need to launch matlab by typing matlab in a terminal, not by double clicking on its shortcut from your desktop. (or even typing ./matlab in a terminal from your desktop)
it's up to the operating system to determine what double clicking does, and it's not guaranteed to execute most of your shell initialization scripts (or even launch it from the correct shell to begin with).
more info at Why are environment variables not resolved when double-clicking .desktop file?
I'm trying to use C-STAT in IAR using only the command line (for Night build).
How can I do that? and how will i get the output (which format).
according to the user manual i'm typing the following command - and getting an error message
" C:\Program Files (x86)\IAR Systems\Em bedded Workbench
7.3_2\arm\cstat>icstat --db a.db --checks commands commands.txt
'icstat' is not recognized as an internal or external command,
operable program or batch file. "
Is there a need to use "icstat" command in a specific path?
Is there a need to install an add-on, or any other program to enable command line commands?
Thanks
Now i found the path should be
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3_2\arm\bin"
I am trying to run a batch file from matlab. In my batch file I have the command to run the .exe file. I am using the dos('myfile.bat') command to run the batch file from matlab, but it is showing the error as
"file.exe is not recognized as an internal or external command, operable program or batch file."
What exactly is this error? And how should deal with this.
If I understand correctly you try to run an exe in MatLab. You don't have to put it inside a batch file, you only need to call it in this way:
! file.exe
or you can setup a string and call it with eval:
command = [ '! ' filename ];
eval( command );
But I think the problem is that you should specify the path of exe (or bat if you like) with absolute path.
! D:\Development\Stuff\App.exe
And of course pass the arguments if required.
! D:\Development\Stuff\App.exe -arg1 -arg2
I'm trying to open a site I created in FileZilla using the command line. This is what have in my .bat file:
#echo off
filezilla.exe -c "0/mysitename"
pause
I'm getting the following error. How can I fix it?
'filezilla' is not recognized as an internal or external command,
operable program or batch file.
In order for an executable to be executed by name, the filezilla.exe file needs to be included on the path. This can be accomplished by
set path=%path%;the\directory\where\filezilla\resides
OR, you can use
the\directory\where\filezilla\resides\filezilla.exe -c "0/mysitename"
My matlab can't recognise the unix('who'); it returns as
the 'who' is not an internal or external command, operable program or batch file
and other unix-like command also cannot run either.
I think you are on a Windows machine. Try some windows commands with system. like system('dir').