Hi,
I am very new to AMPL and MATLAB. I am having diffilculties running the matlab examples. I am trying to run “dietModel.m” example. I extracted a couple of lines from this example:
I get the following errors when running the above code:
179 if ismatrix(values) && size(values, 1) == 1 % row matrix
Unrecognized function or variable 'setMatrixPacked'.
Error in DataFrame/setMatrix (line 182)
self.impl.setMatrixPacked(values, varargin);
Error in indexing (line 57)
builtin('subsref',obj,s);
I am using AMPL “option version ‘AMPL Version 20230124 (MSVC 19.29.30147.0, 64-bit)’” and MATLAB “R2022b Update 4 (9.13.0.2166757 - 64bit - win64)”.
I am currently not sure if the issue lies with AMPL examples or MATLAB.
Please can you advice that the AMPL examples work with my version of MATLAB?
We are not being able to reproduce this issue. We have tested with MATLAB R2022b on Windows and macOS and in both cases the dietModel example and your snippet worked.
Could you please send us the output you get when you run setupOnce? The expected output is the following: