Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
HOW TO USE C CODE IN MATLAB

Subject: HOW TO USE C CODE IN MATLAB

From: MICHAEL OSADEBEY

Date: 3 Mar, 2005 13:32:05

Message: 1 of 5

I am relatively new in image processing and presently embarking on a
project topic ' Gaze Tracking' using matlab.

I am very conversant with matlab. i know little or nothing about C
programming. Most of openCV source codes are written in C.Even the
code 'vfm.zip'that is used for caturing image in matlab is a C code.
Please could any patient and understanding person tell me the steps i
can take to make the C codes work in matlab.

Thanks in anticiapation.

Mike.

Subject: HOW TO USE C CODE IN MATLAB

From: per isakson

Date: 3 Mar, 2005 13:56:34

Message: 2 of 5

MICHAEL OSADEBEY wrote:
>
>
> I am relatively new in image processing and presently embarking on
> a
> project topic ' Gaze Tracking' using matlab.
>
> I am very conversant with matlab. i know little or nothing about C
> programming. Most of openCV source codes are written in C.Even the
> code 'vfm.zip'that is used for caturing image in matlab is a C
> code.
> Please could any patient and understanding person tell me the steps
> i
> can take to make the C codes work in matlab.
>
> Thanks in anticiapation.
>
> Mike.

Did you read "Calling C and Fortran Programs from MATLAB" in the
documentation?

/ per

Subject: HOW TO USE C CODE IN MATLAB

From: Peter Becker

Date: 3 Mar, 2005 15:43:43

Message: 3 of 5

Hi Mike

I'm struggling with C problems, as well.
Currently I try to find out, how to introduce a
'typedef BOOLEAN' into a header file without getting errors.

The whole C area is rather swampy, I guess.

The main problem is, that we don't know anybody who's keen on that
subject.

Second problem: the versions incompatibility:
MATLAB 6.5R12 comes with the LCC-Win32 C-Compiler vers. 2.4
The actual C-Compiler is the 3.3 that can be downloaded free from
'www.cs.virginia.edu/~lcc-win32'.

If you try to introduce it (after installing it) by the matlab
command: 'mex -setup' matlab won't find the new release, that would
probably solve the boolean trouble.

It still tells you, that there is only the 2.4 Compiler available
etc. etc.

So you find yourself at last stumbling somewhere in between heaps of
'unkowns' and 'disunderstandings'.

The online webinars just take your time and are even more confusing,
because of the unclear, mumbled and rare comments (especially for me
as a German).

So good luck to you (and me). Perhaps there is a way to get things
done step by step.
We can keep in contact if you wish. Sometimes 'greenhorns' can
communicate clearer among themselves...

Peter

Subject: HOW TO USE C CODE IN MATLAB

From: Steve Amphlett

Date: 4 Mar, 2005 04:14:21

Message: 4 of 5

Peter Becker wrote:
>
>
<snip, first steps with C-MEX

> Sometimes 'greenhorns' can
> communicate clearer among themselves...

We were all 'greenhorns' once. I have two bits of advice for the
both of you:

1) Spend some money. Buy MSVC++ to use as your compiler.

2) Start small. The biggest breakthrough is when you finally get
that simple one-liner to compile and it actually works. Everything
else can then be done via incremental learning.

Subject: HOW TO USE C CODE IN MATLAB

From: frege

Date: 4 Mar, 2005 04:47:12

Message: 5 of 5

I think that Mike meant : "How do you get a C code to work in Matlab
?" and not "When you have made your mex, how do you get it to work
?". So Mike : see help pages on how to make a mex(or was that not
your problem ?).

-frege

Peter Becker wrote:
>
>
> Hi Mike
>
> I'm struggling with C problems, as well.
> Currently I try to find out, how to introduce a
> 'typedef BOOLEAN' into a header file without getting errors.
>
> The whole C area is rather swampy, I guess.
>
> The main problem is, that we don't know anybody who's keen on that
> subject.
>
> Second problem: the versions incompatibility:
> MATLAB 6.5R12 comes with the LCC-Win32 C-Compiler vers. 2.4
> The actual C-Compiler is the 3.3 that can be downloaded free from
> 'www.cs.virginia.edu/~lcc-win32'.
>
> If you try to introduce it (after installing it) by the matlab
> command: 'mex -setup' matlab won't find the new release, that would
> probably solve the boolean trouble.
>
> It still tells you, that there is only the 2.4 Compiler available
> etc. etc.
>
> So you find yourself at last stumbling somewhere in between heaps
> of
> 'unkowns' and 'disunderstandings'.
>
> The online webinars just take your time and are even more
> confusing,
> because of the unclear, mumbled and rare comments (especially for
> me
> as a German).
>
> So good luck to you (and me). Perhaps there is a way to get things
> done step by step.
> We can keep in contact if you wish. Sometimes 'greenhorns' can
> communicate clearer among themselves...
>
> Peter

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us