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.

What is better for video compression algorithm, C or Matlab?

Status
Not open for further replies.

jamesyang1209

Full Member level 1
Joined
Mar 24, 2004
Messages
95
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
730
C or Matlab?

Dear Group,
When one develop video compression algorithm, use Matlab or C will be better?
 

C or Matlab?

You can easily develop video compression algorithm in matlab.
Matlab is fast as c and you can translate your code to c/c++ by matlab-c compiler.
 

Re: C or Matlab?

Why my professor told us: Use C will be better, since some "memory problem" you will encounter when you use C to program. But Matlab will not.
 

Re: C or Matlab?

i think you should start with matlab especially if you are starting from scratch. then if you have time of computation or memory problems, you could write C code to build a dll inculding the functions of your matlab script that are too computational intesive.

regards.
 

C or Matlab?

In matlab you also can translate your function to dll.
In this way your speed will increase.
 

Re: C or Matlab?

Have you ever try to translate matlab code to c/c++?
Is the result good enough?
Should i pay lots of effor to modify the c/c++ result?
 

C or Matlab?

Yes, I translate some malab functions to c++ & modify & compile them in MVC++6.
 

Re: C or Matlab?

Use MATLAB, verry fast and good solution. No need directly use C++, MATLAB translate to this OK.
 

Re: C or Matlab?

Is the matlab-c compiler exist in matlab version 5.x?
How to use (brief introduction)?
tks.
 

Re: C or Matlab?

Not many programs or person can beat Matlab in prototyping algorithms that involves a lot of calculations. Its library is damn extensive. It is a good starting point anyhow.

However, do allocate more spare time if you intended to use the matlab - c++ compiler. I don't complain about the speed, but, I seriously doubt about its portability. The C++ code generated are largely hooks to the Matlab libs. IIRC, the compiler C++ version is linked to some Matlab dlls. At some stage, you will have to migrate to something like C if the target application is in embeded system. When larger scale deportment is expected, you will have to rewritten quite a few function in C++....

Matlab is too expensive to be used outside research. They won't allow you to use the Matlab run time for free... Although the last time I deal with Matlab/C++ compiler was back in the Matlab 5.0 days, I believe the dependency of installed version of Matlab when running the exported C++ is more like features than bugs to Mathworks. They need to lock the developers down somehow.
 

C or Matlab?

yes, it exist in matlab 5.x. First install vc++.
Then use "mbuild -setup" command in matlab to configure your matlab.
Finally use "mcc" command to translate matlab code to c++.
For more help on mcc command see help of mcc in matlab. "help mcc".
 

C or Matlab?

i think c is better
matlab is not professional
 

Re: C or Matlab?

lamom said:
i think c is better
matlab is not professional

I think you dont work with matlab or not familiar with it very much.
you can translate your matlab code to dll or c++ or exe.
Then your program run fast as c.
You also consider GUI copability of matlab.
 

Re: C or Matlab?

Matlab allows you to check your ideas faster and convert the result to C/C++ code, on the other hand, if you design takes resources, then you can write it in C, after verification in Matlab, for example
 

Re: C or Matlab?

siosavin said:
you can translate your matlab code to dll or c++ or exe.
Then your program run fast as c.

this is true for simple algorithms or simple processing scheme. but with lot of loops, multiple case statements and so on, c/c++ code generation is still not much efficient.

regards
 

Re: C or Matlab?

Use C or C++, you can easily find a lot of libraries for virtually every problem you'll deal whit
 

Re: C or Matlab?

Use C on Matlab .. this will give u the flexibility to have a stand-alone C code ( regardless of any tool ) .. and the the same time u can run ur C on matlab ..
but if u used matlab language .. and even if it's convertable to C .. it will still not be a mature C as if u wrote C directly from the very begining ..

Ur Prof. is 100% true ..
I guess he may ask u later to port ur code to a DSP or so .. and though matlab does support some DSPs , C suports all DSPs in the world ..
 

C or Matlab?

I will test the algorithm in MATLAB and use C/Assembly for real applications and use the MATLAB results to verify C code
 

Re: C or Matlab?

altivec said:
this is true for simple algorithms or simple processing scheme. but with lot of loops, multiple case statements and so on, c/c++ code generation is still not much efficient.
regards

I dont think as you. When you compile matlab code to c/c++, loops are translated to c/c++ directly. A additional code is not produced for it.

I write a RBF neural network & its trainnig for function approximation in both matlab & c++.
I translate malab code to c++ & compile both c++ file in MSVC++6.
I saw that c++ code from matlab is faster than my c++ code.
 

Re: C or Matlab?

siosavin said:
I saw that c++ code from matlab is faster than my c++ code.

well i assume we can't consider this problem with a generic answer. one year ago i tried to translate a filtering bank architecture for a 1MSPS signal from matlab script to high level language and matlab produced me very poor code. the only way was to do code it cleverly and that i don't expect matlab to do it for me.

regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top