Latex output of pretty

11 vues (au cours des 30 derniers jours)
Abdel Halloway
Abdel Halloway le 18 Déc 2017
Commenté : Star Strider le 18 Déc 2017
How do I get a latex output of the version you see in pretty? I have a crazy pair of eigenvalues (see below) that I want to input into Latex but it goes of the page when in Latex format. Is this possible to do?
ee=[-(r_n^2*sigma_p^2 + (Kmax^2*bmax^4*c^2*r_n^2*sigma_k^4 - 2*Kmax^2*bmax^4*c^2*r_n*r_p*sigma_k^4 + Kmax^2*bmax^4*c^2*r_p^2*sigma_k^4 - 2*Kmax*bmax^2*c*r_n^3*sigma_k^2*sigma_p^2 - 2*Kmax*bmax^2*c*r_n^2*r_p*sigma_k^4 - 2*Kmax*bmax^2*c*r_n^2*r_p*sigma_k^2*sigma_p^2 + 2*Kmax*bmax^2*c*r_n*r_p^2*sigma_k^4 + r_n^4*sigma_p^4 - 2*r_n^3*r_p*sigma_k^2*sigma_p^2 + r_n^2*r_p^2*sigma_k^4)^(1/2) + r_n*r_p*sigma_k^2 - Kmax*bmax^2*c*r_n*sigma_k^2 + Kmax*bmax^2*c*r_p*sigma_k^2)/(sigma_k^2*sigma_p^2*(Kmax*c*bmax^2 + r_n)), -(r_n^2*sigma_p^2 - (Kmax^2*bmax^4*c^2*r_n^2*sigma_k^4 - 2*Kmax^2*bmax^4*c^2*r_n*r_p*sigma_k^4 + Kmax^2*bmax^4*c^2*r_p^2*sigma_k^4 - 2*Kmax*bmax^2*c*r_n^3*sigma_k^2*sigma_p^2 - 2*Kmax*bmax^2*c*r_n^2*r_p*sigma_k^4 - 2*Kmax*bmax^2*c*r_n^2*r_p*sigma_k^2*sigma_p^2 + 2*Kmax*bmax^2*c*r_n*r_p^2*sigma_k^4 + r_n^4*sigma_p^4 - 2*r_n^3*r_p*sigma_k^2*sigma_p^2 + r_n^2*r_p^2*sigma_k^4)^(1/2) + r_n*r_p*sigma_k^2 - Kmax*bmax^2*c*r_n*sigma_k^2 + Kmax*bmax^2*c*r_p*sigma_k^2)/(sigma_k^2*sigma_p^2*(Kmax*c*bmax^2 + r_n))];

Réponses (1)

Star Strider
Star Strider le 18 Déc 2017
Have you used the latex (link) function? It will likely do what you want.
  2 commentaires
Abdel Halloway
Abdel Halloway le 18 Déc 2017
Yes, I did try that. I tried latex(pretty(ee)) which doesn't work, and latex(ee) will just run-off the page.
Star Strider
Star Strider le 18 Déc 2017
In that event, you’ll probably need to edit the LaTeX code to break it into more than one line. (That’s not an area of my expertise.)
The ‘official’ LaTeX documentation is The Not So Short Introduction to LaTeX2e (link).

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by