Command Window No Output

조회 수: 57 (최근 30일)
Nolan
Nolan 2024년 6월 3일
편집: Nolan 2024년 6월 10일
Upon typing anything into the command window, the answer is only outputted into the workspace, and not into the command window as the typically expected "ans = ___" line:
Even typing gibberish generates no output or any error handling. It just prompts the next line:
Running a program with internal error handling will work, but it seems things such as type errors or other MATLAB-handled errors are ignored, and there are no ways to generate outputs, unless I force it with disp(). But I obviously don't want to keep doing that nor is that a viable solution going forward.
A coworker was trying to help me with this and we discovered that running "evalc" in the command window generates the same problem on his MATLAB as my current issue. I don't remember ever running "evalc" unless I ran a script at some point that had that included. There seems to be no known solution out there for how to reverse the effect of this "evalc" and/or turn it off.
  댓글 수: 2
Matlab Pro
Matlab Pro 2024년 6월 3일
HI. You wrote: "Upon typing anything into the command window, the answer is only outputted into the workspace, and not into the command window", Well - this is not true: I get the result reflected in both ...
>> 1+1
ans =
2
So maybe I've missed something?
Nolan
Nolan 2024년 6월 3일
As you can see from the picture I attached, what you're describing is not what's happening with mine. That's precisely my issue: I'm not getting the "ans = ____" in the first place.

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

채택된 답변

Nolan
Nolan 2024년 6월 10일
편집: Nolan 2024년 6월 10일
POSSIBLE SOLUTION TO THE ABOVE PROBLEM:
Upon starting MATLAB, the temporary file that's generated at each session causes this error to be displayed in the command window:
After checking my path, I find an editor file (but not the same name as the error displayed, not sure why):
When I was dealing with this no output issue, I've tried multiple times to remove this file from my path, but that didn't work. I tried removing it as a last resort once more before I would've reinstalled MATLAB 2020b, and it seemed to have finally done the job. Even though a new temporary file is generated at every new session (not sure why), there might have been something about the one I removed that was causing the problem, since I no longer face the issue anymore with no output/error catching to the command window, even though this "editor_#####" file still gives a warning message:
This solution also worked on my coworker's computer. He removed all files in the path that resembled this "editor_#####" format. He had three of them whereas I only had one in my path. Remove all.

추가 답변 (1개)

Taylor
Taylor 2024년 6월 3일
A previous post states that resetting MATLAB to its launched state fixed the same issue you're seeing here.
  댓글 수: 1
Nolan
Nolan 2024년 6월 4일
Thanks Taylor but I tried everything in that post and nothing worked. I did what Jan suggested in that post chain by running "!matlab exit" but that didn't work.
At this point if I can't find a solution I'm gonna have to delete my version and get a newer version as Paul Barrette tried.

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

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by