Why do I get the error"Not enough input arguments."
Show older comments

when I press the "Run" button,it shows: >> qqqq Not enough input arguments.
Error in qqqq (line 13) t0=t-t1;
Answers (2)
is a function which needs input t...So when you are running it it is demanding t. But on looking at the script t is already defined inside. So comment the line function [lambda, phi] = qqqq(t) (first line), run it as a script not a a function. Note that you have to remove end when you run it as a script.
Or simply change
function [lambda, phi] = qqqq(t)
to
function [lambda, phi] = qqqq()
5 Comments
hengheng zhang
on 19 Sep 2016
hengheng zhang
on 19 Sep 2016
KSSV
on 19 Sep 2016
You input some t ..it will run..but I cannot promise the result unless it is known what for code is meant.
hengheng zhang
on 19 Sep 2016
Guillaume
on 19 Sep 2016
0 votes
You appear to have a mixture of a script and a function in the same file. Unless you're using the just released R2016b, this is not going to work.
On R2016a, or earlier, move the script (from the start of the for loop) in its own file and run it from there.
On R2016b, move the script before the function and terminate the function with the end keyword.
1 Comment
hengheng zhang
on 19 Sep 2016
Categories
Find more on ROI-Based Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!