I have always been able to use the MATLAB function block on simulink without problems, but ever since yesterday it has been giving me the message
Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.
Use 'mex -setup' to select a supported C-compiler.
After some search I tried installing Windows SDK, and reinstalling Microsoft Visual C++ 2010 Express, but the error persists.
When I run the simulink model the following message appears on MATLAB's main window, before the first message appears on simulink
Warning: ''MySQL' is not recognized as an internal or external
command,
operable program or batch file.
'MySQL' is not recognized as an internal or external command,
operable program or batch file.
VSINSTALLDIR'
exceeds MATLAB's maximum name length of 63 characters and has
been truncated to
''MySQL' is not recognized as an internal or external command,
o'.
I don't know if it they are connected, but the only recent change I made in this computer was installing MySQL in it.
Assuming you're using windows (which it looks like from the question), type !where mysql on the Matlab command prompt. If the result is blank, you've got a path issue. Let's fix it.
First off, locate where your mysql executable lives -- either type where mysql.exe in a command shell, or just find it on the filesytem. Let's assume it's in C:\Path\To\Mysql\. Then, on the Matlab command prompt, change the PATH system variable by running:
setenv('PATH', [getenv('PATH') ';C:\Path\To\Mysql\']);
Hopefully, that will work.
Related
So I am attempting to install some files from Send Grid via Composer usind the CommandLine.
I am following a tutorial with the link here https://www.youtube.com/watch?v=fEobqi3N7zw
The guy in the video has no problem using Composer via the Command Line in the Windows Command Prompt, but when I input the command $ go_www, my PC whines and stamps it's feet, giving me the following line:
'$' is not recognized as an internal or external command,
operable program or batch file.
In a nutshell, why?
System Information:
Windows 10 64x
I have looked at other posts on here, to no avail, I have tried opening the Command Line too as System Administrator, but to avail. I have tried restarting the system, to no avail, I can confirmed I have composer installed into the correct directory, to no avail .
$ in a shell indicates the shell is not owned by a superuser, it is not part of the command. Try running go_www. Also, the video you linked seems to be using a bash shell, whereas you appear to be running a Windows command prompt from the error message you included in your question, which might be a problem too.
In any case, go_www is an alias the video author uses to quickly navigate to the folder of interest. Try manually navigating there using cd.
this problem might not be the problem as u may expect and I'm using Windows 7. I've guaranteed that I have put the path to EVERY SINGLE EXECUTABLE FILE I need in the %PATH%.
Yet I still can't run them nice and smooth by simply type there file name.
For instance, I've already setup my python correctly, now I open my cmd in a totally irrelevant directory, says U:\\
U:\>python
'python' is not recognized as an internal or external command,
operable program or batch file.
U:\>python.exe
Python 3.7.5 on win32
Type "help", "copyright", "credits" or "license" for more information.
And also, 'ipconfig' has the completely same issue as above:
U:\>ipconfig
'ipconfig' is not recognized as an internal or external command,
operable program or batch file.
U:\>ipconfig.exe
Windows IP Configuration
Ethernet adapter Local Area Connection: .......
What!!! How come I MUST type the extension ".exe" to make this happen? Does anyone know how to fix this?
Something messed up the PATHEXT variable on your system. This variable tells windows how to handle files with certain extensions. Or in other words, if you try to execute a file (without extension), Windows takes that variable to try to execute it with the extensions therein (in that order - so if there is a file.bat and another one file.exe and you execute just file, Windows looks into PATHEXT and then executes file.exe, because .EXE is listed before .BAT (short form - actually, also the PATH variable is involved).
On a fresh Win10, PATHEXT has the following content:
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Note, the content of PATHEXT depends on what was installed on your Windows (in your case, it's supposed to be at least:
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
(maybe more - as I said, it depends on your configuration)
typing "start" before the program name.
If this does not work, try using the "cd" command to mount itself at the place of the program you would like to run
I'm trying to call ie4uinit from a python script so that I can update the icon in my task bar. ie4uinit.exe -ClearIconCache does just that, however whenever python calls it, either with subprocess.call or os.system, the following error comes up and the program is not called.
"ie4uinit.exe" is not recognized as an internal or external command,
operable program or batch file.
I have tried giving the full path location i.e.
"C:\Windows\System32\ie4uinit.exe"
Same result.
I have even made a .bat to abstract the call.
I suspect the problem is stemming from a difference in permissions between calling the command from the command line, and calling it through python.
But I don't know how.
I got a problem when executing batch file commands through matlab. This batch file includes commands to run simulations in Adams. When I execute the batch file directly from DOS window, it works well. But if I use matlab to execute it (using command dos()), it gives error saying 'cannot check out the license for Adams'.
This confuses me: if the license is incorrect, it should not work no matter I execute the batch file directly in DOS or ask MATLAB to execute it. I also tried to execute other DOS commands through matlab using dos() and it worked well.
Does anyone know what the problem may be?
Such issues are commonly caused by some environment variables being changed or cleared by MATLAB. I have very similar experience on Linux and Mac OS X, where this causes havoc when using system or unix.
In Unix-like systems, MATLAB is started from a shell script where all of this happens. So you can either incorporate missing variables there or in the .matlab7rc.sh in your home directory (the latter is preserved when you upgrade MATLAB and it is much easier to use). I won't go into all the Unix details here.
An alternative workaround is to explicitly set those variables when you issue a system command (e.g. system('export variable=value ; ...')). It is quite a bit of work, but you can then use that MATLAB code on different computers with ease.
On Windows, I'm not completely sure about the exact location of the corresponding files (and whether MATLAB starts in quite a similar way as on Unix). But if they exist, you can probably find it in the MATLAB documentation.
Anyhow, the alternative fix should work here as well.
First you need to diagnose which system variables you need (likely a PATH or anything that has a name related to Adams).
To do so in Windows, run set from the Windows command prompt (cmd.exe) and from within MATLAB. Whatever differs in the output is a possible suspect for your problem.
To inspect just a single variable, you can use the command echo %variablename%.
I will assume that you have found that the suspect environment variable is missing and should be set to value.
The workaround fix is then to run your command in MATLAB as system('set suspect=value & ...') where you replace ... with your original command.
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').