Break an equation into 2 lines

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)

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 27 de Sept. de 2012
Editada: Azzi Abdelmalek el 27 de Sept. de 2012

9 votos

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)

Más respuestas (1)

Yowh
Yowh el 27 de Sept. de 2012
Editada: Walter Roberson el 4 de Mzo. de 2024

1 voto

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 comentarios

Soumyaranjan
Soumyaranjan el 3 de Mzo. de 2024
Thanks Yowh
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)

Iniciar sesión para comentar.

Productos

Etiquetas

Preguntada:

el 27 de Sept. de 2012

Editada:

el 4 de Mzo. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by