Closed moolawooda closed 1 year ago
The button in the menu bar didn't work for a '.m' file, After clicking, it just open a blank matlab terminal. If I reclick it, the terminal in vscode will say:'run' is not recognized as an internal or external command, operable program or batch file.
and nothing happend.
If you are using windows:
You can find the link to install MATLAB Engine API for Python in README.
Thanks for your response, the pybackend mode do work for me. But in this mode, Chinese characters will not display in the terminal, what should I do to display Chinese?
In my Windows PC, Chinese characters display normally. My system OS is the newest Windows 11, and I use PowerShell as the terminal.
I'm not sure why your terminal is unable to display Chinese characters properly, but this shouldn't be an issue with this plugin.
The "Matlab Interactive Terminal" plugin can display Chinese characters in terminal, but this plugin do not display any Chinese characters in the terminal. I also using the newest win11 system and the default terminal is powershell.
The "Matlab Interactive Terminal" plugin can display Chinese characters in terminal, but this plugin do not display any Chinese characters in the terminal. I also using the newest win11 system and the default terminal is powershell.
You mean when you use disp
to print some Chinese characters, it will not show in the terminal?
If it is, it is a still a issue related to matlab api for python, since this plugin only bring up a python terminal and send the code to this terminal.
Yes, the disp
function could not display Chinese characters in python terminal. Thanks for your reply!
It seems that the "Run Current Matlab File" buttom just open a new matlab window or an interactive terminal but no .m file is running on it. The same situation appears in CMD or Pybackend mode.
In the "Matlab Code Run" extension, the command
matlab -nosplash -nodesktop -sd $work_dir$ -r "run('./$script_name.m$');"
is used instead of onlymatlab -nosplash -nodesktop
to run a specific .m file.Maybe some changes also need to be done with Pybackend mode to make it run a specific .m file.