'Run selection' codes don't appear on Command Window of Matlab 2022a for Mac

13 次查看(过去 30 天)
I have been using Matlab 2022a on my Windows laptop for a while. Recently I purchased a Macbook Pro 2021, and installed Matlab 2022a on it. I see that when I run some lines of code (using 'run selection') from a file open in the editor, the lines are executed but nothing apprears on the command window of Matlab. However, if one of the lines is missing a semicolon (;) in the end, or is printing something (using disp()), that gets printed on the command window.
This is different from what I am used to in windows, where the selected lines are printed on the command window when 'run selected'. How can I fix this?

回答(1 个)

Shuba Nandini
Shuba Nandini 2023-9-7
Hello Anirudha,
I understand you are facing an issue with Command window which doesn’t show any output when using ‘Run selection. I created a script in MATLAB R022a and used ‘Run selection’ to check the output on Command Window. However, I was unable to reproduce the issue at my end.
Please follow the below troubleshooting steps for the Command Window to show the output:
  • check the lower-right corner of the Command Window. If it shows "Initializing”, try the steps in this Answer. If it shows "Busy", MATLAB is running some code. Depending on what that code is doing, it may take a while and you won't be able to execute other commands while that code is running. You can type ahead but they won't get executed until MATLAB has finished its current work.
  • You can try resetting the MATALB to it’s launched state.
  • As a workaround, you can highlight the code and press Cmd+Enter’ to print the output on command window.
Hope this helps!
Regards,
Shuba Nandini

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by