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

DGM
DGM 2021년 11월 3일
편집: DGM 2021년 11월 3일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Language Support에 대해 자세히 알아보기

제품

릴리스

R2021b

질문:

2021년 11월 3일

편집:

DGM
2021년 11월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by