help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to convert code m ade ​​in the octave to C?


From: CdeMills
Subject: Re: How to convert code m ade ​​in the octave to C?
Date: Sat, 7 Apr 2012 12:55:56 -0700 (PDT)

fabbaraujo wrote
> 
> Hi, I need help converting my code to another language, may be the C.
> There is for this tool? Or some way to get?
> 
> Thanks
> 
There is no code converter, like ic C. I asked the same question a few month
ago. What you can do is:
- rewritte your Octave code to be more C-like, that is,
instead of 
if some_cond, do_something()
write
if (some_cond)
  do_something()
endif

This helps in seeing more clearly the code structure, if-else clause and the
like. Next you can use the Gnu Scientific Library to implement vector and
matrix. The most annoying point is that each simple Octave operation must be
rewritten by explicitely iterating on vectors and matrices.

Regards
Pascal

--
View this message in context: 
http://octave.1599824.n4.nabble.com/How-to-convert-code-made-in-the-octave-to-C-tp4539850p4539986.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]