A '(' might be missing a closing ')', causing invalid syntax at '.'. Error located at bracket between 'thetadot2omega' & 'obj.thetadot'. thetadot2omega ( obj.thetadot

% Take input from our controller.
omega = thetadot2omega(obj.thetadot, obj.theta);
% Compute linear and angular accelerations.
a = acceleration (obj.i, obj.theta, obj.xdot, obj.m, obj.g, obj.k, obj.kd );
omega = omega + (obj.time_interval * omegadot);
omegadot = angular_acceleration(obj.i, omega, obj.inertiamatrix, obj.L, obj.b, obj.k);
obj.theta = obj.theta + obj.time_interval * obj.thetadot;
obj.thetadot = omega2thetadot(omega, obj.theta);
obj.theta = obj.theta + obj.time_interval * obj.thetadot;
obj.xdot = obj.xdot + obj.time_interval * a;
obj.pos = obj.pos + obj.time_interval * obj.xdot;

1 Comment

There aren't any open scopes here.
The code you posted works without any syntax errors, provided I go to the trouble of writing a bunch of placeholder functions and defining variables. It's hard to say what's wrong without seeing the rest. I imagine that the problem is in the preceding code.

Sign in to comment.

Answers (0)

Categories

Products

Release

R2021b

Asked:

on 3 Nov 2021

Edited:

DGM
on 3 Nov 2021

Community Treasure Hunt

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

Start Hunting!