Build a calculation from top to bottom. Define variables, evaluate expressions, then insert plots. Click Calculate to update the whole worksheet.
Expressions and arrays
[1,2,3] is a vector. [1,2;3,4] is a matrix. Paste tab-separated cells into the matrix editor. Define f(t) with an expression such as sin(t).
* multiplies matrices; .* multiplies corresponding elements. Powers act elementwise. A scalar broadcasts over an array. Use at(v,0), row(A,0) or col(A,0) to extract values. All indices start at zero.
Standard and ×10 workspaces
Standard uses the normal protected calculation limits. ×10 Workspace raises the worksheet work budget from 3 million to 30 million units (roughly one unit per scalar operation, including each element of an array operation) and also raises selected vector, matrix and surface limits. It is intended for large numerical models and dense plots, so it has a stricter server rate limit and may take longer to finish.
User Function Library
Use Functions in the toolbar for reusable definitions such as gauss(x,mu,sigma). Library functions are stored with the worksheet JSON, compiled before worksheet regions, and do not use paper space or the 150-region allowance. They can call other library functions and can use worksheet variables that have been defined before the function is called.
Save Functions exports the current library as an independent function-pack JSON file. Load Functions accepts one or several function packs at once and merges them into the current library, so you can keep separate RF, control, signal-processing or other simulation libraries. Function packs use the mathssim-functions version-1 format; ordinary M²S worksheet JSON files can also be used as a source of embedded functions.
Complex numbers
i is the imaginary unit. Write 3+4i or 3+4*i. Functions including sqrt, exp, log, trigonometric and hyperbolic functions extend to complex values. Use real(z), imag(z), abs(z), arg(z) and conj(z); complex(a,b) builds a+bi and polar(r,theta) builds r e^(i theta). Complex vectors and matrices support arithmetic, dot, Hermitian vdot, transpose, ctranspose, determinants, inverses and linear solves.
Numerical calculus
integral(sin(t),t,0,pi) integrates over finite bounds. Indexed finite sums and products use sum(k^2,k,1,10) and product(k,k,1,5); the index runs inclusively over integer bounds and the worksheet renders them with bounded Σ and Π notation. The one-argument sum([1,2,3]) remains the vector total. diff(t^2,t,3) evaluates a derivative at 3. partial(x*y,x,2) differentiates with other variables held at their defined values. Nested integrals support finite double/triple integrals within the calculation budget.
Tables
Insert a Table region to display calculated vectors and matrices with presentation headings. Use cols(v1,v2,...) to assemble multiple vectors as table columns. Static row labels are useful for KPI and metric tables.
Advanced model helpers
The PLL parity worksheet uses unwrapdeg(), interp_log(), nearest_log(), nearest_log_inrange(), crosslog(), quartic_stable(), routh_rhp() and integrate_logdb(). Its exact transient and synthesis model uses pll_step(), pll_tdmetrics(), pll_pfd() and pll_synth(). These helpers are deterministic numerical functions and recalculate whenever their upstream worksheet variables change.
Signal Processing toolbox
The Signal Processing toolbox appears below Comparison in the palette. It includes FFT/IFFT, a selective spectrum(t,y,f,window) transform, FFT frequency-axis and shift helpers, six window functions, convolution/correlation, moving average, RMS/energy/power and FIR frequency response. xcorr(a,b) follows the MATLAB/numpy convention R(m) = Σ a[n+m]·conj(b[n]); output index k corresponds to lag m = k − (length(b) − 1). movmean(v,w) is a trailing average of the current and previous w−1 samples (MATLAB's movmean is centred). The window functions are the symmetric forms (MATLAB default); for spectral analysis of a periodic frame, a periodic window of length N is the first N samples of the symmetric window of length N+1. FFT and Spectrum blocks expose a window selector directly in the region editor. Use the ×10 Workspace for dense transforms or large selective spectra.
Plotting
For an XY plot, enter an X vector and one Y expression per line. Use Label := expression to name a trace, append [y2] for the right-hand Y axis, and [step] for a horizontal/vertical step trace. The name x refers to the plot's X samples. Plot coordinates and plotted values are real: project complex data with real(), imag(), abs() or arg(). A surface uses X/Y coordinate vectors and a real scalar expression in x and y, or a real Z matrix (rows = Y, columns = X). Histograms take a real vector and a bin count.
Drag plots to rotate or zoom. PNG exports are 2400 × 1500 pixels. SVG is available for 2D figures. CSV/TXT exports contain plotted samples; histogram exports include both samples and bin counts.
Output sinks and Export ZIP
Insert a CSV sink or TXT sink from the Output palette. Each sink evaluates the variables or expressions listed in its Sources field at that point in the worksheet. Put one source on each line, or use label := expression to customise the exported heading. CSV sinks can use column, long/tidy or wide layouts with selectable delimiters, quoting, headers, precision and complex-number formatting. TXT sinks can use readable blocks, compact assignments or JSON-style text.
Export ZIP, immediately to the right of Save JSON, creates one local package containing WYSIWYG DOCX and PDF copies of the rendered worksheet, the editable JSON worksheet, every calculated Output sink file, and PNG snapshots of calculated plots. The DOCX and PDF preserve the worksheet layout by capturing it page-by-page at A4 proportions. A sink with an error is listed in the package readme and is skipped rather than preventing the remaining exports.
Scope of M²S
M²S is a numerical worksheet, not a symbolic algebra system. Scalars may be real or complex and are unitless; label units explicitly in notes and plot axes. Root bracketing, ranges, sample grids, ordering operations and plot coordinates remain real-valued. Dimensional checking, symbolic solutions, coordinate-aware grad/div/curl, oriented surface/volume integration and general ODE solvers remain outside the current scope. General integrals should be checked for convergence and singularities. inv and solve report an error for singular or near-singular matrices and a warning when the matrix is ill-conditioned.
User Guide, immediately to the right of Help, downloads the full M²S PDF manual shipped with this build.
Save JSON for a portable editable worksheet. A local recovery copy is kept in this browser. Plotting, mathematical typesetting and WYSIWYG document capture use pinned Plotly, KaTeX and html2canvas libraries served from this site.