I've been trying to figure out how to run Matlab files in Google Colab.
I've installed Octave (apt install Octave
) into my Colab. But trying to run my .m
file with !octave -W make_video.m
then just returned
parse error near line 91 of file /content/drive/testing/catdeform/code/util/figure_code/make_video.m
nested functions not implemented in this context
>>> function [shape] = load_shape(res_dir, anchor_coords, anchors)
^
error: source: error sourcing file '/content/drive/testing/catdeform/code/util/figure_code/make_video.m'make_video.m'
So then I did !pip3 install oct2py
and went into the directory the .m
file is in and did:
from oct2py import Oct2Py
oc = Oct2Py
oc.make_video
And got output "make_video" Octave function
Then I did !octave -W make_video.m
again and got:
error: 'exists_or_mkdir' undefined near line 51 column 1
error: called from
make_video at line 51 column 1
What might I be doing wrong? Maybe there is a way better approach to take than trying to even use Octave/oct2py for running matlab files in Google Colab?