Not enough Input Arguments?

1 view (last 30 days)
Stuart Nezlek
Stuart Nezlek on 19 Oct 2020
Edited: Stuart Nezlek on 19 Oct 2020
Hello, I am trying to load some data from an Excel sheet but am given the following message for both programs:
Not enough input arguments.
Error in loadIMUdata_KADLROM (line 5)
file=[Sub '_' Loc '_' side 'KneeHipAng.xlsx']
Currently, the code is written as such:
function [dataNew]=loadIMUdata_KADLROM(act,Sub,Loc,side,P1,P2,P3,P4,P5,P6,a)
file=[Sub '_' Loc '_' side 'KneeHipAng.xlsx'];
the excel file in question is titled as such:
KADLROM_TKA_002_KneeHipAng.xlsx
Help is appreciated, and I can add more code if needed for clarification

Accepted Answer

KSSV
KSSV on 19 Oct 2020
You might be running the function without giving input variables....you should be in the folder where excel file and this function is present. Define all the variables and then call the function.
% define the input variables
act = yourvariable ;
Sub = your variable ;
Loc = your variable ;
side = your variable ;
P1 = your variable ;
P2 = your variable ;
P3 = your variable ;
P4 = your variable ;
P5 = your variable ;
P6 = your variable ;
a = your variable ;
% now call the function
dataNew=loadIMUdataET(act,Sub,Loc,side,P1,P2,P3,P4,P5,P6,a)
  1 Comment
Stuart Nezlek
Stuart Nezlek on 19 Oct 2020
Edited: Stuart Nezlek on 19 Oct 2020
Thank you for this. I realized that some of the variables were from another bit of code that references the function and as such the function was looking for variables that were unable to be defined given the context I'm using them for.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!