Not Enough input Arguments Plotting
显示 更早的评论
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 个评论
KL
2017-5-5
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
2017-5-5
编辑:Andrew Newell
2017-5-5
Gary
2017-5-5
Gary
2017-5-5
回答(1 个)
Image Analyst
2017-5-5
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Geographic Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!