dot indexing is not supported in MATLAB

I am trying to simulate the arduino braccio robot in the matlab for a simple pick and place task, here is the complete code for that:

clear; clc; close all;

%% Step 1: Define the Braccio Robot Model

% Create a rigid body tree model
robot = robotics.RigidBodyTree('DataFormat', 'column', 'MaxNumBodies', 6);

% Define base
body1 = robotics.RigidBody('link1');
jnt1 = robotics.Joint('jnt1', 'revolute');
setFixedTransform(jnt1, trvec2tform([0, 0, 0.1]));  % Adjust height as needed
jnt1.HomePosition = 0;
body1.Joint = jnt1;
addBody(robot, body1, 'base');  % Adding link1 to the base

% Define link2, link3, link4, link5, and gripper (similar to link1)
% Define link2
body2 = robotics.RigidBody('link2');
jnt2 = robotics.Joint('jnt2', 'revolute');
setFixedTransform(jnt2, trvec2tform([0.1, 0, 0]));  % Adjust length as needed
jnt2.HomePosition = 0;
body2.Joint = jnt2;
addBody(robot, body2, 'link1');

% Define link3
body3 = robotics.RigidBody('link3');
jnt3 = robotics.Joint('jnt3', 'revolute');
setFixedTransform(jnt3, trvec2tform([0.1, 0, 0]));  % Adjust length as needed
jnt3.HomePosition = 0;
body3.Joint = jnt3;
addBody(robot, body3, 'link2');

% Define link4
body4 = robotics.RigidBody('link4');
jnt4 = robotics.Joint('jnt4', 'revolute');
setFixedTransform(jnt4, trvec2tform([0.1, 0, 0]));  % Adjust length as needed
jnt4.HomePosition = 0;
body4.Joint = jnt4;
addBody(robot, body4, 'link3');

% Define link5
body5 = robotics.RigidBody('link5');
jnt5 = robotics.Joint('jnt5', 'revolute');
setFixedTransform(jnt5, trvec2tform([0.1, 0, 0]));  % Adjust length as needed
jnt5.HomePosition = 0;
body5.Joint = jnt5;
addBody(robot, body5, 'link4');

% Define gripper
body6 = robotics.RigidBody('gripper');
jnt6 = robotics.Joint('jnt6', 'revolute');
setFixedTransform(jnt6, trvec2tform([0.05, 0, 0]));  % Adjust length as needed
jnt6.HomePosition = 0;
body6.Joint = jnt6;
addBody(robot, body6, 'link5');

% Show the robot model
showdetails(robot);
show(robot);
title('Braccio Robot Model');
pause(2);

%% Step 2: Simulate Pick-and-Place Task

% Define the initial and target poses
initialPose = trvec2tform([0.1, 0.0, 0.1]);  % Initial position
targetPose = trvec2tform([0.2, 0.1, 0.2]);   % Target position

% Inverse kinematics solver
ik = robotics.InverseKinematics('RigidBodyTree', robot);
weights = [0.25, 0.25, 0.25, 1, 1, 1];
initialGuess = robot.homeConfiguration;

% Solve for the initial configuration
[configSol, ~] = ik('gripper', initialPose, weights, initialGuess);

% Display the robot in initial pose
show(robot, configSol);
title('Initial Pose');
drawnow;
pause(2);

% Solve for the target configuration
[configSol, ~] = ik('gripper', targetPose, weights, initialGuess);

% Display the robot in target pose
show(robot, configSol);
title('Target Pose');
drawnow;
pause(2);

%% Step 3: Integrate Model Predictions (Optional)

% Main loop with simulated predictions
pickX = 0.1;
pickY = 0.0;
placeX = 0.2;
placeY = 0.1;

% Get simulated model predictions
angles = getModelPredictions(pickX, pickY, placeX, placeY);

% Initialize predictedConfig as an array of JointState objects
predictedConfig = repmat(robot.homeConfiguration, length(angles), 1);

% Apply the predicted angles to the robot configuration
for i = 1:length(angles)
  % Set joint position for each body
  predictedConfig(i).JointPosition = angles(:, i);
end

% Display the robot with predicted angles
show(robot, predictedConfig);
title('Predicted Angles Pose');
drawnow;
pause(2);

%% Function Definitions

% Example function to simulate getting predictions from a model
function angles = getModelPredictions(~, ~, ~, ~)
  % Simulate model predictions
  angles = [0.5, 0.25, -0.5, 0.0, 0.5, 0.1];  % Example values
end

and this is the error I am getting

Unable to perform assignment because dot indexing is not supported for variables of this type.

Error in rigidbody (line 110)
    predictedConfig(i).JointPosition = angles(:, i);
 

I kept getting this error, I don’t understand is it because of the the for loop variable or something related to the robot description.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật