User Guide
This guide covers everything you need to use ccalc effectively: from the first expression in the REPL to scripts with functions, matrices, structs, and plots.
Contents
| Topic | What you will find |
|---|---|
| Getting Started | Installation, first session, key concepts |
| REPL Mode | Interactive session: history, tab completion, workspace |
| Pipe & Script Mode | One-liners, shell pipelines, running .m files |
| Arithmetic & Operators | Precedence, bitwise ops, the ans variable |
| Variables | Assignment, who, clear, workspace save/load |
| Number Bases | Hex 0x, binary 0b, octal 0o input and display |
| Number Display Format | format short/long/rat/hex and custom precision |
| Formatted Output | fprintf, sprintf, %d/%f/%g/%s specifiers |
| Configuration | ~/.config/ccalc/config.toml reference |
| Matrices | Literals, arithmetic, indexing, built-in constructors |
| Vector & Data Utilities | sum, sort, find, reshape, unique, … |
| Comparison & Logical Operators | ==, ~=, &&, |, element-wise ops |
| Complex Numbers | 3+4i, abs, angle, conj, complex matrices |
| Strings | Char arrays, string objects, built-in string functions |
| File I/O | fopen/fclose, dlmread/dlmwrite, isfile |
| Control Flow | if, for, while, switch, break, continue |
| User-defined Functions | Named functions, lambdas, nargin/nargout |
| Cell Arrays | {...}, brace indexing, cellfun, arrayfun |
| Structs and Struct Arrays | .field access, struct(...), fieldnames |
| Error Handling | error, try/catch, pcall, lasterr |
| Variable Scoping | global, persistent, private/ directories |
| Statistics & Random Numbers | mean, std, rand, randn, distributions |
| Linear Algebra | eig, svd, lu, qr, chol, pinv |
| JSON | jsondecode, jsonencode |
| CSV — Tables and Matrices | readtable, writetable, csvread, csvwrite |
| MAT Files | load/save with .mat format |
| Datetime & Duration | datetime, duration, formatting, arithmetic |
| Matrix Utilities & Set Operations | intersect, union, ismember, kron |
| Polynomial Operations & Interpolation | polyval, polyfit, roots, interp1 |
| FFT & Signal Processing | fft, ifft, fftshift, freqz |
| Dynamic Evaluation & Timing | eval, feval, tic/toc |
| Plugins | The Plugin trait and custom built-ins |
| Plot Functions | plot, scatter, surf, contour, subplot, … |