Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to run a matlab program in shell programmming?

Status
Not open for further replies.

pd

Full Member level 1
Joined
May 23, 2006
Messages
99
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,288
Location
India
Activity points
2,243
matlab in a shell

Hi .
I am using cygwin for linux interface in windows.Actually I want this.I have a matlab program which produces some files.Those files are needed by another C++ program to produce the final result.How can I do the whole proces through shell programming in a single file run in cygwin?
Thanks,
pd
 

matlab run from shell file

You need to have matlab in your path or unleast know where it's installed, But first check that matlab can be driven from switches

Added after 3 minutes:

I mean if matlab can be run from the command line
 

how to execute a matlab program on linux

I can run matlab from command line by using command matlab in xterm(in cygwin).But it only takes that doesn't take any futher arguments e.g. the matlab file name.So how do I run the matlab file directly?
 

running shell program from matlab

If matlab it self can't be driven from the command line Then what will U use as an editor for the matlab files?
I think that you can do this with a bash or bat script (not relay sure) If U need to execute an m file for instance, in explorer go to tools->folder options->file types; search for m -files and see what and how it is executed, if it can only be opened by meditor U can't run from eny shell not just cygwin, if there is an option to execute it write the parameters and make an appropriate script that would execute the appropriate file.

sorry I don't have matlab installed at the moment and can't verify this it's only an idea ;)

Added after 10 minutes:

And by rereading your post I'd have to say that matlab can't be run from a shell directly, but what U can do is compile your m files to appropriate executables (exe on win and elf (no extension) on unix systems) by using the matlab compiler mcc (matlab comes with a free c/c++ compiler called lcc) U need to have the matlab compiler and assosiated packages installed tho.
And now you can simply execute the compiled executables :) if you had a file1.m after compiling it (mcc -m file1.m) you can run file1.exe
I hope this helps
 

    pd

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top