Rewriting MATLAB in Java

Joined
3/3/11
Messages
22
Points
11
I need to rewrite an entire piece of MATLAB code in Java. I just find the structure very confusing, like how MATLAB stores data in matrices and Java uses array, etc...Any advice on the best way to rewrite MATLAB to Java? Thanks.
 
Try to solve the problem in Java instead of re-writing. Only use Matlab as a model.
 
Why do you need to re-write it?

With Matlab's variable browser (finally in xcode 4 too!) you should be able to vet what you're doing at various steps and breakpoints. I suppose it depends on how complicated it is, have you identified a complete regression test for acceptance?

Oh and there's this if you don't have to re-write and you just want it wrapped in java classes
http://www.mathworks.com/products/javabuilder/
 
If you're coding the correct way in Matlab (vectorized) then it should be virtually useless pseudocode for translating to Java. It's an entirely different style of programming. As Alain said, use it at as a model and start from scratch.
 
Thanks for the advice. Alain and Alex, I think you're right, using MATLAB only as a model and starting from scratch seems the most sensible thing to do.
 
Back
Top Bottom