Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Typically: "How do I... ", "How can I... " questions
Post Reply
baojw
Posts: 10
Joined: 08 Sep 2023, 03:05

Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Post by baojw »

Hello, I am using V-REP and MATLAB for reinforcement learning. The training process runs smoothly, but when I try to run the trained agent with the following code:

%% Play the game with the trained agent
simOptions = rlSimulationOptions('MaxSteps',3000);
experience = sim(env,agent,simOptions);

I encounter an error:

Error using subscript
Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Error in subscript (line 30)
info = builtin('subsref', self.x__info, S(1:end-1));

Error in trainDDPGWT4 (line 122)
experience = sim(env,agent,simOptions);

The error seems to be occurring in the zmqRemoteApi\clients\matlab\RemoteAPlObject.m file, specifically at line 30. How can I resolve this issue?

fferri
Posts: 1230
Joined: 09 Sep 2013, 19:28

Re: Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Post by fferri »

baojw wrote: 18 Dec 2023, 06:38 Error in trainDDPGWT4 (line 122)
experience = sim(env,agent,simOptions);
What's that?

sim is a name used in the RemoteAPIClient lib.

If that is also the name of a variable in your script, you should use a different name.

baojw
Posts: 10
Joined: 08 Sep 2023, 03:05

Re: Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Post by baojw »

Hello, thank you for your reply. I also have a question on how to modify the default simulation speed control and visualization on/off for VRP, as I have found that increasing the simulation speed and visualization off would result in better graphics card usage.

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Post by coppelia »

Hello,

various simulation step sizes can be set/adjusted in the simulation dialog. You can turn off rendering during simulation via the appropriate toolbar button (right to the rabbit button).

Cheers

Post Reply