Not Enough input Arguments Plotting
Show older comments
hey all...I manually made a contour plot using bxx,byy,Mean_Pk_Stat variables that were calculated in a program. Looks great, has titles, etc. Then I generate code for the plot and have the Average_PkPress.m plot code in my folder. I write in my main program, for example
Average_PkPress (bxx,byy,Mean_Pk_Stat);
I run the same program, generate the same data and get the 'not enough input arguments' error, and a blank plot appears. I can still manually make a plot with the same (x,y,z) data after the program stalls. Is Matlab having troubles finding the data? I have never seen this before, but I am still a neophyte.
Any thoughts? Thanks in advance
4 Comments
KL
on 5 May 2017
It means exactly what it says. You don't have input arguments required by your function. Since we don't have access to your folder to see this m file, it's hard for us to tell you more. It's better if you also add that code snippet to your question.
Gary
on 5 May 2017
Edited: Andrew Newell
on 5 May 2017
Gary
on 5 May 2017
Gary
on 5 May 2017
Answers (1)
Image Analyst
on 5 May 2017
You need to accept the user's response into a variable and you aren't doing that, so do it like this:
meanPeakPressure = input('Mean Peak Pressure Colormap-Enter');
Average_PkPress (bxx,byy,Mean_Pk_Stat);
maxPeakPressure = input ('Maximum Peak Pressure Colormap - Enter');
Max_PkPress (bxx,byy,Max_Pk_Stat);
meandP = input('Mean dP/Dtheta colormap -Enter');
Average_DPDTHeta (bxx,byy,Mean_DP_Stat);
meandP = input('Mean dP/Dtheta colormap -Enter');
Max_DPDTHeta (bxx,byy,Max_DP_Stat);
Whether you're passing in all the variables that function Average_PkPress() needs, we don't know, because you didn't give the function definition of Average_PkPress.
You have to make sure you're collecting the user input into the correctly named variables and pass all the variables into a function that the function needs.
Categories
Find more on Geographic Plots 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!