talukder88 / roa_estimate

MATLAB toolbox to inner-estimate region-of-attraction of dynamical field comprising trigonometric terms
GNU General Public License v3.0
2 stars 0 forks source link

Out of range subscript. #1

Open jdanielhoyos opened 8 months ago

jdanielhoyos commented 8 months ago

Hello, first of all thanks for the help! Im trying to run it with this only polynomial field:

syms x1 x2 x3 x4 % define the symbolic state variables

vars = [x1; x2]; % define the state vector

dyn_field = [2x2+x1^2-1; -x1x2]; % specify the continuous-time dynamic field

eq_guess = [0; 1/2]; solver = "sedumi"; % can be "cdcs", "sdpt3", "csdp", "sdpnal", % "sdpnalplus", "sdpa", or "mosek"

run(dyn_field, vars, eq_guess, solver); % call the tool

but it says an error:

Error using sub2ind Out of range subscript.

Error in indexing (line 963) R_tilde = sub2ind(size(L), Idx.subs{:});

Error in sosconstr (line 85) degcheck = evalin(symengine,char(symexpr(i,i)));

Error in sosineq (line 125) sos = sosconstr(sos,'ineq',symexpr);

Error in find_init_lyap (line 57) prog = sosineq(prog, lyap_func - v1*zero_equality_constr - q);

Error in run (line 28) lyap_func_init = find_init_lyap(poly_dyn_field, zero_equality_constr);

I suspect it is related to the fact that zero_equality_constr is empty after [poly_dyn_field, zero_equality_constr] = ... trig_to_poly_transform(dyn_field);

Thanks!

talukder88 commented 7 months ago

Sorry for the delayed response. I believe the issue is that you are missing the asterisk symbols in the product terms in dyn_field. Let me know if this does not resolve.