Continue a long expression on multiple lines

I have a very lengthy algebraic expression in a script that needs to be split into multiple lines, such as the following example
4+5+3+ ...
1+55+6- ...
4*6+8+ ...
etc (suppose there are 1000 more lines of the expression)
Notice that I have manually typed three dots at the end of each line to keep up the flow, but is there a way to let Matlab add the three dots automatically at the end of each line?

4 件のコメント

Stephan
Stephan 2021 年 3 月 23 日
Do you have the expression as a text file or something you can provide here?
Mathieu NOE
Mathieu NOE 2021 年 3 月 23 日
hello
is it not possible to simply copy paste that in a txt file and load the file ?.
Walter Roberson
Walter Roberson 2021 年 3 月 23 日
I use an external editor (vi) for this kind of work. However the expressions I am working with usually need more manipulation than that, such my wanting to add spaces around operators, so I am usually doing a bunch of regular expression work and adding the dots is usually the easiest part of that editing.
Harry Lee
Harry Lee 2021 年 3 月 24 日
編集済み: Harry Lee 2021 年 3 月 24 日
Thanks, I just used an external editor to do that, it worked.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

質問済み:

2021 年 3 月 23 日

編集済み:

2021 年 3 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by