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.
C or Matlab?

I think you dont write your matlab code good.
For me, matlab code is equal to c++ code with same speed & clearity.
 

Re: C or Matlab?

I think you dont write your c/c++ code good.
For me, matlab code is inferior to c/c++ code in terms of speed but not in terms of clarity
:)

by the way this discussion looks like the same as assembly language against c/c++ :D

regards
 

C or Matlab?

now i don't have matlab in my pc
if you convert matlab to c code, is it easy to understand by human?
 

Re: C or Matlab?

siosavin said:
You can easily develop video compression algorithm in matlab.
This is true regarding all Matlab programing and IMHO is it's main strength.
Matlab is fast as c and you can translate your code to c/c++ by matlab-c compiler.
Here I totaly desagree. Matlab may, and it often is, 10 to 20 times slower than native C code. Transforming .m code to C (with the compiler) doesn't help anything. In fact compiled code is even slower than m code.
If speed is an issue, just forget that Matlab even exists.
 

Re: C or Matlab?

is the c code generated by MATLAB compiler efficient enough for embedded applications ?

what about the embedded target toolbox ? it embeds your simulink model directly on a DSP ( TI / Motorolla ) How efficient is it?
 

Re: C or Matlab?

altivec said:
by the way this discussion looks like the same as assembly language against c/c++

You are mistake. There are difference between translating from c 2 asm & m-file to c.
For example in traslating c to asm, for statement "for" many statements in assembly is produced. This is because of the structure of these two language are not same.

But In translating matlab to c, for statement "for" only one satement produced in c (only "for"). In these language, structures are same.
 

Re: C or Matlab?

well I meant that discussing whether one should use matlab or program in c/c++ in terms of computation was the same never-ending discussion as knowing whats was better to use between C and assembly language.

taken from the mathworks

Compilation is not likely to speed up M-file functions that:

- Are heavily vectorized.
- Spend most of their time in MATLAB's built-in indexing, math, or graphics functions.

so if matlab compiler can't produce efficient code for these sorts of things, one should think of programming them with c/c++

regards[/i]
 

Re: C or Matlab?

I wonder why people write algorithm codes in C, libaries are not enough.
while Matlab offer us a lot of functions. Do you know which is better is ASIC algorithm development flow,Matlab or C. If C is better, how to find
DSP related libaries.
 

Re: C or Matlab?

For testing and tuning of algorithms, a very high level language is very useful. I use Matlab for this stage because the process of changing/testing and “see inside” the algorithm is very agile and the possibilities of making mistakes are reduced. Once the algorithm is tuned, it can be translated to C. Sometimes, critical (very time sensitive) parts can be translated to assembly.

Development/Testing/Tuning .... Implementation ....... Full optimization (when needed)

Very high level ........................ High level ............... Low level
Matlab .................................... C/C++ ................... Assembly
Low efficiency .......................... High efficiency ........ Very High efficiency
Very flexible ............................ Flexible .................. No flexible

Z
 

Re: C or Matlab?

hello dear
i strongly feel that one should go for MATLAB.(at least at the beginners level). if u r an expert also then also u won't like to devote ur precious time in coding those functions which r available in MATLAB..the saved time u can utilise for furthur ammendments in ur project
bye
 

Re: C or Matlab?

kunal said:
hello dear
i strongly feel that one should go for MATLAB.(at least at the beginners level). if u r an expert also then also u won't like to devote ur precious time in coding those functions which r available in MATLAB.
I agree on this.
the saved time u can utilise for furthur ammendments in ur project
bye
It depends. For example, I fell insulted having to wait tens of seconds (minutes even) for an operation that is virtually instantaneous with compiled C code. Specially if I have to wait for it before deciding what to do next.
 

Re: C or Matlab?

I think I am standing on the predecessor's shoulder by using the Matlab.
You can build your overall frame of the DSP quikly through it.
 

C or Matlab?

MATLAB is better and has many ready made functions to help you
 

C or Matlab?

I does not think there is a simple Yes or No answer to this question. It largely depends on what applications you are working on. For computation intensive applications such as error control coding, C is a better choice. For some quick jobs, Matlab has its certain advantages. By the way, I never trust the C codes converted by Matlab. It is too slow.
 

C or Matlab?

Matlab is a good tool to do simulation in terms of speed and performance. However, for implementation, I dun think Matlab can handle the task to generate hardware optimized code in C.
 

Re: C or Matlab?

Hello,

I would like to know if are there algorithms in C or Matlab about digital beamforming.

Thanks

Adriane
 

C or Matlab?

I think C is better, for it is very easy to migrate.
and its algorithm flow is very clear.
 

C or Matlab?

Matlab is good to use ,especially in the algorithm.
 

C or Matlab?

if u want to make a hardware development of video compression ,u'd better use C.
 

Re: C or Matlab?

I think all debuging, simulation, and visaulisation (very usable) of ALGORITHM
should perform in MATLAB. And then all parts of your algorithm is simulated and work fine, you should write your own C-code for this algorithm by the hand.
Never use Matlab automatic conversion to C++ (with the exception of self-education) So, your C-code can be put to any DSP or uC.
Using MSVC with Matlab C++ conversion tool is platform-depended solution. You not be able to port this code to Linux/Unix or another platform (like DSP or ARM)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top