Too Many Input Arguments

4 visualizaciones (últimos 30 días)
Ivan Dwi Putra
Ivan Dwi Putra el 2 de Dic. de 2020
Comentada: Ivan Dwi Putra el 2 de Dic. de 2020
I have checked the number of arguments in the traindiscretemodel function and in the main Train_PF program the number is the same, but it says error too many input arguments
Error using traindiscretemodel
Too many input arguments.
Error in Train_PF (line 85)
[Pa(j+1,i),Va(j+1,i),Ta(j+1,i)] =
traindiscretemodel(ua(j,i),Tim_step,Pa(j,i),Va(j,i),Ta(j,i),Mass(i),Ca_0(i),Ca_1(i),Ca_2(i),R(i),Eta,fR,g,Cw,A,rho)
this is my train discrete model function
function [PositionN, VelocityN, TorqueN] = traindiscretemodel(Tim_step,Position,Velocity,Torque,Mass,Ca_0,Ca_1,Ca_2,R,Eta,fR,g,Cw,A,rho)
% Train Model
PositionN = Position + Velocity*Tim_step;
VelocityN = Velocity + 1/Mass *(Eta*Torque/R - (Ca_0 + Ca_1*Velocity + Ca_2*Velocity^2))*Tim_step;
TorqueN = (((fR*Mass*g*Cos(Theta) + Mass*g*Sin(Theta) + 1/2*Cw*A*rho*Velocity^2 + Mass*Velocity)*R)/4*Num_veh)*Tim_step;
end

Respuesta aceptada

KSSV
KSSV el 2 de Dic. de 2020
Editada: KSSV el 2 de Dic. de 2020
The function takes 15 inputs and you are giving 16 inputs. Please check.
I feel the first input ua(j,i) is extra.
  4 comentarios
KSSV
KSSV el 2 de Dic. de 2020
The respective functions are Cos and Sin, I don't think they are inbuilt functions. The input functions are cos, sin (first letter is small, see the difference). If the error too many input arguments is solved, then you will know about this.
Ivan Dwi Putra
Ivan Dwi Putra el 2 de Dic. de 2020
ok thank you

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by