Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-2007, 03:39 PM
Kank Kank is offline
Newbie
 
Join Date: Sep 2007
Posts: 1
Rep Power: 0
Kank is on a distinguished road
Default Convert matlab code to C/C++ on Linux

Hi,

I would like to convert my matlab code to C/C++. I've got some problems.

1. In my matlab code, I have some differential/integral equations implemented by numerical math (e.g. euler method), so sampling time is specified easily. How can I convert these equations into C/C++ on Linux ? I do not know the sampling time and it has to work realtime.

2. My work is to track a given trajectory, for example, I can give: x = cos(t) y = sin(t), t is time. So I can get point (x,y) at each time step. When I convert to C/C++ using time from Linux system, I cannot get the correct points on the trajectory.
Also, in each loop in my program, there are some if/else conditions. The time taken in each case is not constant.

I know someone can solve these problems easily. It happens all the time when we have to implement something in realtime systems.
Could anyone please give me some suggestions?

Thank you in advance.

Kank
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-20-2007, 11:02 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,057
Last Blog:
wxWidgets is NOT code ...
Rep Power: 24
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

Unfortunately, you are talking about implementing Numerical Analysis, which can get rather messy in a hurry. If you do a search for numerical integeration you will probably find some results. You may also want to use YACAS to perform some of your work.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-11-2007, 02:09 AM
Patrick Patrick is offline
Programmer
 
Join Date: Sep 2007
Posts: 100
Rep Power: 4
Patrick is on a distinguished road
Default

I did what you said Mr. Winged but please tell me what is YACAS? Is there any other means through which I can solve the same problem?

Waiting for your reply curiously.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert your photoshop document to a CSS in less than 30 seconds clookid Photoshop Tutorials 17 06-04-2008 11:36 AM
Basic Calculator AfTriX VB Tutorials 3 02-29-2008 08:53 AM
Please Help With A C Program!! siren C and C++ 7 04-17-2007 08:45 AM
calling C script from via Matlab rattlepanos C and C++ 3 02-16-2007 11:06 AM


All times are GMT -5. The time now is 09:55 AM.

Contest Stats

chili5 ........
TcM ........
z-e-o ........
administrator ........
smheist ........
Jordan ........
phpforfun ........
Jaan ........
John ........
ShortCircuit ........

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads