Effacer les filtres
Effacer les filtres

Too Many Input Arguments

3 vues (au cours des 30 derniers jours)
Ivan Dwi Putra
Ivan Dwi Putra le 2 Déc 2020
Commenté : Ivan Dwi Putra le 2 Déc 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

Réponse acceptée

KSSV
KSSV le 2 Déc 2020
Modifié(e) : KSSV le 2 Déc 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 commentaires
KSSV
KSSV le 2 Déc 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 le 2 Déc 2020
ok thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by