Wrap a long syms equations
Version 1.1.0.0 (1.85 KB) by
Mohannad Hakeem
wraps a long syms equation so that it becomes more readable.
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).
Inputs:
string1: An expression written in syms
n_columns: users can change the maximum width of each line
Cite As
Mohannad Hakeem (2026). Wrap a long syms equations (https://www.mathworks.com/matlabcentral/fileexchange/24273-wrap-a-long-syms-equations), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14SP2
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Symbolic Math Toolbox in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
