필터 지우기
필터 지우기

Breaking out of input() ?

조회 수: 97 (최근 30일)
Ratna
Ratna 2011년 10월 7일
Hi,
In my system I have Matlab 2009 version. When a run a program I will get the output immediately followed by "Please enter the input array" - this is a string I used in another program,which i wrote few days back and this string continues for a number of times sometimes around 50 or even more. Now I didn't even know where the string.
Is there any way that I can stop this command.
  댓글 수: 2
Walter Roberson
Walter Roberson 2011년 10월 7일
Please change the title to something more descriptive. Nearly everyone's question fits under the category of "Problem with Matlab".
Ratna
Ratna 2011년 10월 7일
Thanks Walter

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2011년 10월 7일
Control-C will stop nearly anything (eventually.)
Entering
return
in response to an input() prompt will often get interesting reactions...
  댓글 수: 2
Ratna
Ratna 2011년 10월 7일
This doesn't help
Walter Roberson
Walter Roberson 2011년 10월 7일
control-c did not stop the program??
I am getting confused about what is desired here: a way to break out of a repeating prompt to enter the matrix, or a way to figure out where this is coming from in your code so that you can change the code?

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Fangjun Jiang
Fangjun Jiang 2011년 10월 7일
Once you opened MATLAB, Click menu Window->Command History. A window will show up showing all your previous entries in the Command Window. Hope you can find what you did a few days back.
  댓글 수: 2
Ratna
Ratna 2011년 10월 7일
It only has the history from the time you open Matlab.
Fangjun Jiang
Fangjun Jiang 2011년 10월 7일
I just checked. My Command History shows entries dated two weeks back. It depends on how many entries are there.
What are you looking for? A command or string you entered a few days ago? Or a way to stop your program? Or a way to stop a particular command in your program?

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2011년 10월 7일
My guess is that your "program" that gives the output (that you want) is an m-file that has in it (somewhere after the output gets displayed) a line that looks something like
userResponse = intput("Please enter the input array");
or something similar. And it's probably in a loop of some kind so it repeatedly comes up. Why don't you just look over your m-file source code for a line that has "input" (if it's a command window prompt) or "inputdlg" (if it's a popup dialog box) in it?

카테고리

Help CenterFile Exchange에서 System Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by