How to convert octave file into matlab?

I tried to use ‘oc2mt’ but I did not know how it works

We’ll need more information that that. There’s no need to “convert” one to the other because Octave is designed to read and execute code written for Matlab. What is this “oc2mt” and what is its URL?

Thank you for this. I have data file that works in octave but when I try to load in Matlab it does not work and I’ve got this error
the error is :
‘Not a binary MAT-file. Try load -ASCII to read as text’

Did you try Matlab’s suggestion to use load -ascii? Did it help?

You can try help load and help save to see the different formats available in Octave. You can try saying save -ascii foo.mat in Octave and seeing if Matlab loads it with load foo.mat or load -ascii foo.mat. You can try different flags there both in saving and loading to see what works for your specific version of Matlab.

1 Like

Yes, I saved the file in ocatve in the following format:

save -mat7-binary ‘filename’

And it works perfectly

Which version of Octave did you use to save that file?

I recently downloaded it, not sure what version.

The version is printed in the command window (or terminal) when you start Octave.