Not enough input arguments.
10 views (last 30 days)
Show older comments
Hi, I'm very new to matlab. My question may sound stupid, but I appreciate any help to get me started. I'm trying to run a function to plot 3D point clouds (fscatter3). Any way, here are the variables the function requires:
% Plot values in the color vector c at the locations in L = (x,y,z)
% g = plot3k(L,c,marker,nlabels)
% Input
% L x,y,z location vector, n x 3
% c color vector, default = z, n x 1
% marker marker character, default = '.'
% nlabels number of colorbar labels, default = 10
% Output
% g figure handle for the plot
So I created L and c variables as matrices and no matter what I do, I get "Not enough input arguments" error. Maybe I define the variables in a wrong way? Can someone briefly explains if he is going to run the function, what are the steps? Thanks in advance
0 Comments
Answers (1)
Geoff Hayes
on 5 Mar 2016
Ahmed - the signature for this function is
g = plot3k(L,c,marker,nlabels)
Given the error message, it sounds like you are not supplying enough input parameters when you call this function. You need to provide the L, c, marker, and nlabels as inputs to this function.
In the command line (or from within another function or script), you would define these four variables and then call this function as
>> g = plot3k(L,c,marker,nlabels)
How are you trying to call this function?
2 Comments
Geoff Hayes
on 5 Mar 2016
Ahmed - your variables aren't text files, they just appear in the variables inspector as such. So now that you have L and c, how are you calling your function? As
g = plot3k(L,c);
It seems that the other two input parameters are optional (since your post above indicates that there are default values).
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!