Not enough Input Arguments?

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

 采纳的回答

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 个评论

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.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Data Import from MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by