"XXX" requires more input arguments to run

21 visualizaciones (últimos 30 días)
Martin
Martin el 11 de Sept. de 2013
Comentada: Steven Lord el 1 de Jul. de 2016
Hi,
I have this message error when I accidentally pressed F5 on a child function. This is totally normal but I can't suppress this message, and it stays in front of the editor! Do you know how to remove this?
Thanks!
  7 comentarios
D. Speller
D. Speller el 24 de Ag. de 2015
The box in the screenshot above has persisted for several days (I just really don't want to restart my Matlab session...)
Steven Lord
Steven Lord el 1 de Jul. de 2016
I have again tried to reproduce this but been unable to do so. I pasted each section of the code from Heinz's answer into the Editor, saved it, and clicked on the green arrow. I received errors in the Command Window for the second of the third functions, but no error for the first or third and no "blue box" / window / message for any of the three cases.
If you can consistently or even occasionally reproduce this behavior, please contact Technical Support with those reproduction steps. Useful additional information to include:
  1. What version of MATLAB are you using?
  2. What operating system (be as specific as you can; if it's Linux, what distro and what version?)
  3. If it's Linux, what window manager are you using?
  4. Provide a function that when you try to run it from the editor causes this behavior.
  5. If there are any variables defined in the base workspace, indicate if you can reproduce this behavior without them being open.

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 12 de Sept. de 2013
Is there any kind of push button on it? Or does it have a white X on a red box in the upper right corner that you can click? Otherwise type Ctrl-shift-Esc, find the process and end it.
  1 comentario
Martin
Martin el 13 de Sept. de 2013
The windows is all yellow, and there is no X or push button on it. I'll try the CTRL shift esc thing next time it occurs. We'll see! :)

Iniciar sesión para comentar.

Más respuestas (10)

Jan
Jan el 12 de Sept. de 2013
It is clear, that you cannot suppress this message, because it is an important error message. Do you mean that you cannot close the window which contains this message? If so, which OS and Matlab version are you running?
  1 comentario
Martin
Martin el 12 de Sept. de 2013
Yes, I mean that I cannot close the window which contains this message. I run R2013a 64 bit on Windows 7.

Iniciar sesión para comentar.


David H
David H el 2 de Jul. de 2015
All these answers are basically "give the function default parameters" which is not always a desirable solution. If I accidently hit f5 I'd rather it didn't overwrite any variables in my work space, even ans. Mathsworks really needs to fix this bug, 2 years is quite unacceptable.

Gorka
Gorka el 4 de Oct. de 2013
I have the same problem, do you know how to solve it ?

jalpa vasani
jalpa vasani el 16 de Oct. de 2013
how did you solve this problem? I am facing same one for factorial program!
  2 comentarios
Image Analyst
Image Analyst el 16 de Oct. de 2013
I don't understand how you can't get rid of the error message and it just stays on top in front of the editor. Are you saying there is no way to close it, either with some kind of button that says "OK" or "Close", or by clicking the white X on the red box in the upper right corner of the error message? So you have the same problem as Martin - a yellow warning message box with no title bar and no buttons? Please capture a screenshot and attach it here with the image or paper clip icon.
D. Speller
D. Speller el 1 de Jul. de 2016
A copy of my comment above, in case someone sees this and can help: I have had the same problem on Linux, with repeatability. What is required is to 1. Create a function with required input parameters; and 2. Click the green arrow labeled "Run" in the Editor tab of the script editor. I usually run into this when I have been using the command window or a wrapper script to run the function repeatedly for different values of the input parameters, but still have the function open. If the script is, for some reason, in the forefront (for example, after minor editing), and I accidentally run it directly with "Run" instead of from the command line or the wrapper script, a blue box with the note regarding additional required inputs appears and does not go away.

Iniciar sesión para comentar.


Wooseok
Wooseok el 20 de Nov. de 2013
The same problem here. As a correction to this question, it's not a 'window', but it's just a yellow balloon message that appears on top of the editor window and never disappears. Because it is not a window, there is neither "OK" nor "Close" button. Also, it is not an independent process so it doesn't appear in the task manager. So, there is really no way to get rid of it but closing and restarting Matlab.

Dakkaron
Dakkaron el 7 de Dic. de 2013
Editada: Dakkaron el 7 de Dic. de 2013
I have this problem as well. I am running Matlab R2012b on Windows 7 64 bit.
The problem occurs when you try to run a script file that contains a function without specifying the parameters of the function (so when you hit the "Run"-button in the script editor). The message itself isn't wrong at all. The problem is just that you can't get rid of it without closing the window. I attached a screenshot of the error. Though it belongs to the script editor (left window) it shows up right of the editor thus covering about a quarter of the console window which is extremely annoying especially if you suffer from a bit of OCD ;)
The only solution I found so far is closing the script editor (not the console window) and reopening it, which is a right pain if you have a few files open.

Wesley Ooms
Wesley Ooms el 28 de Mzo. de 2014
Editada: Wesley Ooms el 31 de Mzo. de 2014
Same problem here. If f5 / f9 is a reflex, then you end up with 20 balloons per minute.
I found a solution for my case.
If it happens because you have the variable in your base workspace, you should save the file and type the filename with arguments in the command window like this:
file:
function do_stuf(input)
do stuff
end
command window:
do_stuf(input)
however since the reflex is so powerfull, you can write this in your function
function do_stuf%(input)
evalin('base','assignin(''caller'',''input'',input)')
do stuff
end
and the balloon will never pop up anymore

Christine
Christine el 1 de Abr. de 2014
I had the same problem and found this way to make the yellow box disappear:
If Matlab complains "dummy_function(input1, input2) requires more input arguments...." you press the small, black, downward facing arrow called 'Run' below the actual big green arrow with the same function as f5 (After this confusing description I decided to attach a picture...). You will find two options:
Run: dummy_function
Run: type code to run
Right click on the first option and then 'edit' enables you to put some default parameters for input 1 and input 2. The yellow box disappears and will also not appear again. If you don't want to set those default parameters, just press enter and the yellow box disappears but will reappear when ever you use f5 or the large green arrow.
  1 comentario
Martin
Martin el 2 de Abr. de 2014
Thanks, I had forgotten this post but your message could be really useful. :)

Iniciar sesión para comentar.


Eric
Eric el 13 de Jun. de 2014
bump... same issue

Heinz
Heinz el 16 de Oct. de 2015
Editada: Heinz el 16 de Oct. de 2015
I also have this problem and it is extremly annoying!
What works is:
function [ output_args ] = Untitled( m)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
A=1
end
What does Produce the Problem (correctly)
function [ output_args ] = Untitled( m)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
A=1
m^2
end
What does produce the Problem and should not !!!
function [ output_args ] = Untitled( m)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
if nargin == 0
m=13
end
A=1
m^2
end
But besides knowing why it appears, its extremely annoying, that the yellow boxes can not be closed. (Except by closing the editor.) This is clearly a bug.
At least it works from the command line without problem. But with every F9 there is yellow box with "always on Top" Propertiy. And because it covers some of the ribbon, you have to move the editor, and every time the new yellow box hides a little more of your screen.
PLEASE SOLVE THIS !!!

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by