what must i do to bring a matlab program from Windows in ubuntu to work

1 view (last 30 days)
For the processing of my Masterthesis I have received a Matlab program, which has been already tested under Windows. I use Mathlab under Ubuntu 16.04 and can't start this program.
Matlab gives to me this error:
Index exceeds matrix dimensions.
Error in StereoGui>StereoGui_OpeningFcn (line 71)
ImDir=[list{1} '\'];
Error in gui_mainfcn (line 221)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
Error in StereoGui (line 42)
gui_mainfcn(gui_State, varargin{:});
  1 Comment
John D'Errico
John D'Errico on 8 Feb 2017
So talk to the person who provided the code to you.
It seems that while you claim this code was "tested" in Windows, that you have no idea how to use it. That can only come from the provider.

Sign in to comment.

Answers (1)

Bjorn Gustavsson
Bjorn Gustavsson on 8 Feb 2017
Code contributer wasn't coding right for portability. Have a look at the documentation for fullfile and fileparts. Then set the debug status to stop at errors (write dbstop if error at the prompt), and start rewriting. you could also do a toolbox-wide search for functions that might use filenames or directory paths. I'd run commands like this in my shell:
find ./ -name \*.m -print0 | xargs -0 grep -e 'imread'
and so on...
This to me seems to be an unsuitably dull task, but if the original provider doesn't help you out, this is what you'll have to do...
HTH

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!