Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

TopicWhat you will find
Getting StartedInstallation, first session, key concepts
REPL ModeInteractive session: history, tab completion, workspace
Pipe & Script ModeOne-liners, shell pipelines, running .m files
Arithmetic & OperatorsPrecedence, bitwise ops, the ans variable
VariablesAssignment, who, clear, workspace save/load
Number BasesHex 0x, binary 0b, octal 0o input and display
Number Display Formatformat short/long/rat/hex and custom precision
Formatted Outputfprintf, sprintf, %d/%f/%g/%s specifiers
Configuration~/.config/ccalc/config.toml reference
MatricesLiterals, arithmetic, indexing, built-in constructors
Vector & Data Utilitiessum, sort, find, reshape, unique, …
Comparison & Logical Operators==, ~=, &&, |, element-wise ops
Complex Numbers3+4i, abs, angle, conj, complex matrices
StringsChar arrays, string objects, built-in string functions
File I/Ofopen/fclose, dlmread/dlmwrite, isfile
Control Flowif, for, while, switch, break, continue
User-defined FunctionsNamed functions, lambdas, nargin/nargout
Cell Arrays{...}, brace indexing, cellfun, arrayfun
Structs and Struct Arrays.field access, struct(...), fieldnames
Error Handlingerror, try/catch, pcall, lasterr
Variable Scopingglobal, persistent, private/ directories
Statistics & Random Numbersmean, std, rand, randn, distributions
Linear Algebraeig, svd, lu, qr, chol, pinv
JSONjsondecode, jsonencode
CSV — Tables and Matricesreadtable, writetable, csvread, csvwrite
MAT Filesload/save with .mat format
Datetime & Durationdatetime, duration, formatting, arithmetic
Matrix Utilities & Set Operationsintersect, union, ismember, kron
Polynomial Operations & Interpolationpolyval, polyfit, roots, interp1
FFT & Signal Processingfft, ifft, fftshift, freqz
Dynamic Evaluation & Timingeval, feval, tic/toc
PluginsThe Plugin trait and custom built-ins
Plot Functionsplot, scatter, surf, contour, subplot, …