Results 1 to 4 of 4
  1. #1
    uzil24 is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default Matlab data type implementation & speed

    Hi all,
    I have a great deal of Matlab code which I'm required to implement in JAVA.
    Since the code is complicated and far from being OO I tried to create a Matlab data type in JAVA. after doing so I simply translated the code using the data type.
    The problem is run time.
    The same code takes a fraction of a second in Matlab and almost 2 minutes(!!!) in JAVA. I used the "ojalgo" package with my implementation, so most of the code should be efficient.
    why is this happening? Am I too naive to try this?
    Does Matlab have some special "trick" to hasten it's running time?
    Any insights will be highly appreciated.

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    It depends on the functions you are talking and how you have implemented them.

  3. #3
    uzil24 is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by r035198x View Post
    It depends on the functions you are talking and how you have implemented them.
    How do you propose I do it?
    Would you do something like that or try a different approach?

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Why do the functions need to be reimplemented?
    I would take a look at apache's commons-net project if I were you.

Similar Threads

  1. run a matlab script from java
    By npoorni in forum Advanced Java
    Replies: 5
    Last Post: 02-11-2010, 03:32 PM
  2. sychronized data type
    By java girl in forum Threads and Synchronization
    Replies: 3
    Last Post: 02-13-2009, 08:37 AM
  3. How to speed sql Statements?
    By bezudar in forum Advanced Java
    Replies: 3
    Last Post: 11-20-2008, 09:53 AM
  4. Help, Integrate a Java with Matlab
    By toby in forum Advanced Java
    Replies: 2
    Last Post: 08-07-2008, 07:08 AM
  5. Replies: 1
    Last Post: 08-07-2007, 05:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •