View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Wrap a long syms equations

5.0 | 2 ratings Rate this file 2 Downloads (last 30 days) File Size: 1.85 KB File ID: #24273 Version: 1.1

Wrap a long syms equations



27 May 2009 (Updated )

wraps a long syms equation so that it becomes more readable.

| Watch this File

File Information

WRAP_string(string1) rewrites a long syms equation and wraps
it so that it becomes more readable. It automatically divides the expression into individual lines with three dots "..." at the end of each line. Moreover, it detects the existence of operators +,-,*,/ so that it doesn't cut a long name of a variable (such as Lamda_w).

string1: An expression written in syms
n_columns: users can change the maximum width of each line

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
20 Jan 2016 Christopher Creutzig

Different, but related: pretty(symbolicAnswer).

Comment only
04 Jun 2009 Nassim Khaled

Nassim Khaled (view profile)

There should be something built-in/matlab to manipulate equations and text. Thanks

04 Jun 2009 Mohannad Hakeem

27 May 2009 us

us (view profile)

there should be a L1 line in the help section...
the help section is broken: add a % between the description and the example...
the n_columns variable should be an optional input making it more easy to change than having to edit the file...
the result should also be collected in an (optional) output argument...


Comment only
28 May 2009 1.1

this file was updated so that it ends each line on a mathematical operator (+,-,*,/). in the previous edition, the code might end a line while cutting the name of a long variable (such as Lamda_w)

Contact us