Break an equation into 2 lines

64 次查看(过去 30 天)
If an equation is too long to fit in one line, how to break it into two lines? An example of a long equation is as below and I wish to put it in two lines:
z=x(1)^2-2*x(1)*x(2)+6*x(1)+4*x(2)^2-3*x(2)+7*x(1)+5*x(2)^2-3*x(2)*x(1)^2-2*x(1)

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2012-9-27
编辑:Azzi Abdelmalek 2012-9-27
z=x(1)^2-2*x(1)*x(2)+6*x(1)+4*x(2)^2-3*x(2)...
+7*x(1)+5*x(2)^2-3*x(2)*x(1)^2-2*x(1)

更多回答(1 个)

Yowh
Yowh 2012-9-27
编辑:Walter Roberson 2024-3-4
z=x(1)^2-2*x(1)*x(2)+6*x(1)+4*x(2)
z=z^2-3*x(2)+7*x(1)+5*x(2)^2-3*x(2)*x(1)^2-2*x(1)
  2 个评论
Walter Roberson
Walter Roberson 2024-3-4
Would have to be
z=x(1)^2-2*x(1)*x(2)+6*x(1)+4*x(2)
z=z-3*x(2)+7*x(1)+5*x(2)^2-3*x(2)*x(1)^2-2*x(1)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by