Reputation: 3156
I compiled a C program in Visual Studio Express 2010.
#include<stdio.h>
main()
{
printf("Hello World");
}
This produces a file "hello.exe" on my C drive. In Matlab, I use this command,
! hello
And it prints "Hello World" to my Matlab console.
What is the name of the !
Matlab command? I have been trying to find documentation for it but is having difficulty because I don't know what keywords to Google for. Thanks!
Additional Info
I will be running a fairly complicated C program that outputs a plain text file. Then using Matlab to read the text file, put the data into matrices/arrays and manipulate these in Matlab.
Upvotes: 1
Views: 3620
Reputation: 2447
As a follow up point. If you are spending a lot of time writing C utility functions that you would like to use in MATLAB, you should consider turning them into MEX functions. A MEX function is a MATLAB function that uses C/C++/Fortran code in the background, allowing you to save the output of those external functions directly into your MATLAB workspace.
For more information, you can read through this: http://www.mathworks.com/help/matlab/create-mex-files.html
Upvotes: 1
Reputation: 14939
Have you read this?
http://www.mathworks.se/help/symbolic/mupad_ref/system.html
I think it's what you're looking for =)
Edit:
Also, if you type:
help !
You will get the name (amongst other stuff):
punct - Invoke operating system command - !
Upvotes: 1