0

I'm asked to write a small project in Matlab. I don't know Matlab and I don't want to learn it and I'm on Linux.

Is there a free online C++ (or python) converter to Matlab? It's a small project but the professor only knows Matlab. I know that C++ and Matlab are similar so converting syntax shouldn't be a big deal.

Please don't recommend octave, I'll have to learn Matlab syntax if I want to use it.

  • I don't think C++ is remotely like MATLAB. It is possible to wrap C++ up so that it is callable from MATLAB so this might minimize the amount of MATLAB necessary. – Eric Shain Jun 8 '17 at 15:00
1

Using Universal-transpiler, it is possible to convert a very limited subset of C++ into equivalent Matlab code.

As an example, this is some C++ code:

double distance_formula(double x1,double y1,double x2,double y2){
    return sqrt(pow(x1-x2,2)+pow(xy-y2,2));

and this is the translator's output:

function distance_formula(x1,y1,x2,y2) 
    return sqrt(((x1-x2)^(2))+((xy-y2)^(2)));
end
  • I'm going to accept your answer since I'm no longer using matlab and since this this the only answer available. Thank you – Lynob Feb 28 '18 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.