I have no experience with MATLAB before. Now, I am trying to edit a MATLAB program to make it runnable in GNU Octave (both on Windows system).
I fixed some errors such as +:nonconformant arguments (op1 is 1x1, op2 is 0x1) by changing some operators or special characters. For example, I changed
val = textscan(unit53,'%d %s %f %f %f %f \r\n');
to
val = textscan(unit53,'%d %s %f %f %f %f "\r""\n"');
I successfully edited the program and it runs without an error. However, my edited program takes about 32 hours to finish running. The original MATLAB program only takes about 10 minutes to run.
The slow part of program is a for loop about declaration, filling matrices with the information read from a document, and doing calculation with those matrices.
Does this happen (runs slower) every time when you try to run MATLAB code in Octave?
How to make that MATLAB code run faster?