command inputdlg doesnnot work

Hello everyone,
Whenever i try to use the command inputdlg, the box appears but it is impossible to type any answer (there is no space for it).
i have been looking online and havent been able to find a solution to my problem
I hope one of you will have a solution on how to solve it
thank you in advance!

4 comentarios

Amit
Amit el 5 de Feb. de 2014
How are you using inputdlg? Attach the code or part of the code!
Pauline
Pauline el 5 de Feb. de 2014
Editada: Pauline el 5 de Feb. de 2014
the problem isnt coming from the code, i have tried it on other computers and it works perfectly, the problem seems to happen only on mine.
prompt={'quelle est la longueur du rectangle?','quelle est la largeur du rectangle?','quel est le nombre de noeuds sur la longueur du rectangle?','quel est le nombre de noeuds sur la largeur du rectangle?'};
title ='choix des donnees';
answer=inputdlg(prompt,title);
L=str2num(answer{1});
l=str2num(answer{2});
nbx=str2num(answer{3});
nby=str2num(answer{4});
Amit
Amit el 5 de Feb. de 2014
Okay. It works fine on my computer as well. Resolution issues?
Pauline
Pauline el 5 de Feb. de 2014
Editada: Pauline el 5 de Feb. de 2014
hm when i open matlab, i always get a message telling me that "the program is going to change the color scheme to Windows 7 Basic" but i have always gotten it and if im not mistaken i think this command has worked before.
i was thinking that it was related to microsoft visual c++ but im not sure if its the case or even how to solve it if it is.

Iniciar sesión para comentar.

Respuestas (3)

Image Analyst
Image Analyst el 5 de Feb. de 2014

0 votos

It sounds like you're running MATLAB via a VNC remote session or have connected your computer to an external projector. Are you doing either of those things?

8 comentarios

Pauline
Pauline el 5 de Feb. de 2014
Editada: Pauline el 5 de Feb. de 2014
i havent done any of those things
i have downloaded cygwin recently to code in C/C++, could this program be in conflict with matlab ?
I would not think so. I code in Visual Studio and there's never any such message. The only time I know of that Windows announces that is when Windows asks the video adapter to switch its spatial or color resolution. Is everything normal until you step on the line that says:
answer=inputdlg(prompt,title);
????
Pauline
Pauline el 5 de Feb. de 2014
yes, i just copied and pasted everything until this line and i dont get any error message.
Why did you do that? Don't you know how to step through it with the debugger??? You don't need to debug by copying and pasting partial hunks of code to a new window and running it from there. Just click in the margin to set a break point and then type F5 or click the green run triangle. Then when it stops you can type F10 to step on code, or F11 to step into functions. That's the way you should do it. Watch this video: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/ Then find out exactly what line of code makes the message appear.
What does this say if you type it in the command window:
which -all inputdlg
We need to make sure you didn't overwrite it with an m-file of your own with the same name.
Pauline
Pauline el 5 de Feb. de 2014
i tried what you said but i dont get any error message the commande inputdlg works in the sense that the box shows up , the only difference is that i cant type anything.
"What does this say if you type it in the command window:
which -all inputdlg"
C:\MATLAB701\toolbox\matlab\uitools\inputdlg.p C:\MATLAB701\toolbox\matlab\uitools\inputdlg.m % Shadowed
Image Analyst
Image Analyst el 5 de Feb. de 2014
That's a bit weird. I don't get the .p file listed when I do it.
So when you execute the inputdlg() function you are not getting the "the program is going to change the color scheme to Windows 7 Basic" message anymore?
You just can't type into the edit box? Maybe it's a focus issue. Are you sure you clicked in the edit field and the cursor is blinking in there?
Pauline
Pauline el 5 de Feb. de 2014
Editada: Pauline el 5 de Feb. de 2014
This message doesnt accure when i use the inputdlg function but when i open matlab
i doubt that this message is related to the problem im having with the inputdlg function knowing that i have always had this message appearing since i have matlab.
Image Analyst
Image Analyst el 6 de Feb. de 2014
So you're having two different problems then. I agree with Andreas - time to upgrade. One last thing you could try and that is to run your MATLAB in compatibility mode with XP (if you're using Windows 7 or later) to try to trick it into thinking it's running on XP which is the platform your old version of MATLAB was designed for.

Iniciar sesión para comentar.

David Sanchez
David Sanchez el 5 de Feb. de 2014

0 votos

It seems someone played with pcode.... Go to
C:\MATLAB701\toolbox\matlab\uitools\
and delete the file
inputdlg.p
Make sure
inputdlg.m
is there.

1 comentario

Pauline
Pauline el 5 de Feb. de 2014
i have never touched those pcode files
i just deleted it and tried my code again, i now get this error message
??? Previously accessible file "C:\MATLAB701\toolbox\matlab\uitools\inputdlg.p" is now inaccessible.
Error in ==> mailler_rectangle_structure at 10
answer=inputdlg(prompt,title);

Iniciar sesión para comentar.

Andreas Goser
Andreas Goser el 5 de Feb. de 2014

0 votos

MATLAB 7.0.1 is pretty old and not supported on Windows 7, see page. I suggest to upgrade.

Categorías

Más información sobre Software Development Tools en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 5 de Feb. de 2014

Comentada:

el 6 de Feb. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by