matlab help plzzzz

Thread Starter

Siddharthd

Joined May 28, 2010
5
ppl,,

i made a project in matlab on image processing.... it reads a image and changes it through some code... which is not important...

The problem is that when i run my project through matlab command window,, the desired results are produced in nearly 15 sec... which is quite fine...

Now I created a stand alone executable file by ..

mcc -m project.m -o project

an .exe file with some .c files are created.. Now when I run this .exe,, the results are produced right but...

It is taking more than 2-3 mintes may be 4.... I don know what is happening... What I know i s that it's consuming most of its time in processing imread('image.jpg')....

I don kno what to do to get it running as fast as it does in the command window of matlab.....

Plz help,, any help is appreciated..
Thanks in advance
 

retched

Joined Dec 5, 2009
5,207
The amount of memory that matlab holds for processing is much greater than what is set at default for a standard program.

You will need to find a way to allow your new program to reserve and use a larger chunk of available memory.

I had this same exact problem years ago. MS-DOS years ago.

I had to increase the files and buffers in config.sys to allow more memory for programs.


It could also be the way the file is compiled may be less efficient than the original code.

Kind of like if you write a program in assembly and C and compile them both, the assembly written program will typically run faster.
 

Thread Starter

Siddharthd

Joined May 28, 2010
5
hey retched....
thanks for the reply...

may you are right about low memory being available to the dos program....

But can u tell me how exactly to change this...
I made some changes in config.sys as follows..
DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE 10240

I don knoif its right,, I got it on some website....
I even used the Matlab memShieldStarter to reserve some memory... but that doesn work too.....

Plz someone tell me what to do...
 

retched

Joined Dec 5, 2009
5,207
I am not the best person to ask now-a-days because I have no idea what interactions config.sys has with windows now that windows is not DOS backed or based.
BUT, I would follow what is listed here:
http://www.pcguide.com/opt/opt/ramDOS-c.html

Notice the FILES and BUFFERS and play there. Also, I would check Microsoft.com 's knowledge base and see if you can find a way to expand memory to dos programs.

I would think there would be a way to do this per-program in matlab, but alas, I do not use and have not used matlab.

(And Im not sure I want to ;) )
 

Thread Starter

Siddharthd

Joined May 28, 2010
5
why???

what do have against matlab???
or u know anything that works better than matlab on applications like image processing.....

Anywaz,,, thanks for the help....
 

retched

Joined Dec 5, 2009
5,207
No, I have nothing against it at all.. I was trying to make a joke.

A lot of folks seem to have trouble with it.. It seems powerful, but I would lose more hair then work I would get done.

Good luck bro. I would give the forum a day or so to see if people in the "know" have better ideas.
 
Top