cprintf not work in linux command window

조회 수: 2 (최근 30일)
Yu Li
Yu Li 2019년 8월 16일
댓글: Yu Li 2019년 8월 16일
Hi:
I noticed that function 'cpirntf' does not work in Linux command window, below is what I did:
1. open a command window in Linux system
2. type command below:
module load matlab/R2018b
matlab -nosplash -nodesktop
addpath(genpath('path contains cprintf'))
3.
cprintf('keywords','abcde\')
below is the result:
Capture.JPG
is there anyway to make it work?
Thanks!
Yu
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2019년 8월 16일
Yu - is the problem that the abcde is not coloured blue? Is that what you are expecting? Have you tried other calls (to this function) with a different first parameter? (For reference, see cprintf.)
Yu Li
Yu Li 2019년 8월 16일
Hi:
Yes, I expect it to print with blue, or other colors.
I also tried others, but still all in 'black', please see screen shot below:
Capture.JPG
Thanks!
Yu

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

채택된 답변

Stephen23
Stephen23 2019년 8월 16일
편집: Stephen23 2019년 8월 16일
"open a command window in Linux system"
cprintf works in the MATLAB Command Window:
cprintf is unrelated to the command window of any OS, nor does Yair Altman's extremely informative website say that it will have any effect on any OS command window. He does explicitly entitle one of his first posts on the topic "Changing Matlab’s Command Window colors",however you are not using the MATLAB Command Window, so there is no reason to expect it to work.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by