Why am I getting error "Too many input arguments"
조회 수: 1 (최근 30일)
이전 댓글 표시
This is embarrassing... I can't figure out why it's saying "Too many input arguments."
Here's the definition. It seems to me that predict(...) takes 10 arguments:
classdef TrajectoryPredictor
% TrajectoryPredictor predicts a trajectory.
% Its predict() method returns data. Other methods are private.
properties
model
simParams
end
methods
function tp = TrajectoryPredictor(vehicleModel, simParams)
tp.model = vehicleModel;
tp.simParams = simParams;
end
function [trajectory_output, state_vector] = predict(...
measure_vector, measure_time, ...
previous_measure, previous_time, ...
previous_state_vector, waypoints, ref_traj, ...
lat0, lon0, alt0)
etc
Here's the instance creation and the call to predict(), with line numbers added:
122 predictor = TrajectoryPredictor(model, simParams);
123 [predicted_traj, state_vector] = predictor.predict(...
124 loc_now, t_now, ...
125 loc_prev, t_prev, ...
126 state_vector, waypoints, ref_traj, ...
127 lat0, lng0, alt0);
It sure looks to me like there are 10 arguments being passed. But I get:
Error using TrajectoryPredictor/predict
Too many input arguments.
Error in test_prediction>do_test_prediction (line 123)
[predicted_traj, state_vector] = predictor.predict(...
(It really should say how many it sees and the number(s) it expects...)
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!