Pasting large code without forced wrapping

조회 수: 3 (최근 30일)
Ulrik William Nash
Ulrik William Nash 2019년 12월 7일
댓글: Stephen23 2020년 4월 20일
I am trying to paste a very large portion of code, which has been via Mathematica. The problem is that MATLAB breaks the code at the vertical line in the editor and adds \ to show where. There are too many of these to make manual removal of these \ feasible.
How can I get MATLAB to let me simply paste-as-is?
  댓글 수: 2
Rik
Rik 2019년 12월 7일
Can you confirm this is an issue with Matlab? Can you try to paste it in a text editor as well?
Stephen23
Stephen23 2020년 4월 20일
Those backslashes are a feature of Mathematica, they have nothing to do with MATLAB.
"With a single backslash at the end of a line, the Wolfram Language ignores the line break:"
"By default code copied from the FrontEnd is formatted with backslashes added at the ends of lines."
Why would MATLAB would insert a Mathematica syntactical feature that has no meaning in MATLAB?

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

답변 (1개)

Jared MacDonald
Jared MacDonald 2020년 4월 20일
MATLAB does not do this. Presumably Mathematica is putting it onto the clipboard this way. You can confirm this as Rik notes by pasting into another text editor such as Notepad.

카테고리

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