Not enough input arguments

Hi, I have an error not enough input arguments. And I have no idea what kind of input parameters should be assign for the following function.
function measure(old,handles)
And I'm getting the following error:
Not enough input arguments.
Error in measure (line 11) varnames = old.allVarNames';
can any one of you please help me how to solve this.

6 件のコメント

Adam
Adam 2018 年 10 月 24 日
編集済み: Adam 2018 年 10 月 24 日
It looks like some arbitrary function of your own or what someone gave you. All we can tell you is what you seem to already know. You need to pass in arguments for old and handles. If there is no indication in the function as to what those should be then unfortunately you have bad code to work with and will have to try to work it out or abandon the code.
Judging by the error message, old is expected to be a struct so goodness knows what fields it is expected to have, it could be anything. The fact it has a field called 'allVarNames' is in itself not an encouraging thought as to what it should hold. handles sounds like it would come from a GUI, but again, who knows?
KSSV
KSSV 2018 年 10 月 24 日
What is function measure ???
sri Jagarlmudi
sri Jagarlmudi 2018 年 10 月 24 日
function [ readings, VarChannels , Uniplot_channel_info, new] = measure(old,handles)
Adam
Adam 2018 年 10 月 24 日
Where is it from? I assume it isn't your own function else you'd know what its arguments should be.
sri Jagarlmudi
sri Jagarlmudi 2018 年 10 月 24 日
Yes, it was not my own function. I'm trying to write matlab unit test function for this code. For that I need to clear the errors in this function.
Adam
Adam 2018 年 10 月 24 日
You need to ask whoever you got it from in that case.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2018 年 10 月 24 日

コメント済み:

2018 年 10 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by