Why am I getting error "Too many input arguments"
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Randy Strauss
el 8 de Abr. de 2020
Comentada: Randy Strauss
el 8 de Abr. de 2020
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 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Classification Trees en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!